AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
Remove editor block drag handle
tianma-if49de42a43058
diff --git a/apps/web/src/components/EditorPane.tsx b/apps/web/src/components/EditorPane.tsxindex 31edfbe8..4d332647 100644--- a/apps/web/src/components/EditorPane.tsx+++ b/apps/web/src/components/EditorPane.tsx@@ -105,7 +105,6 @@ import { ExternalLinkDialog } from "./dialogs/ExternalLinkDialog";import { MathFormulaDialog } from "./dialogs/MathFormulaDialog";import { AttachmentTranscriptDialog } from "./dialogs/AttachmentTranscriptDialog";import { SpeechProviderReachabilityError } from "@/lib/speech-transcription-error";-import { EditorBlockDragHandle } from "./editor/EditorBlockDragHandle";import {applyMathFormula,deleteMathFormula,@@ -4339,9 +4338,6 @@ const RichEditorPane = ({onAsk={() => requestSelectionAi("ask")}/></BubbleMenu>- {!isMobileViewport && !effectiveReadOnly && isEditorReady(editor) ? (- <EditorBlockDragHandle editor={editor} />- ) : null}<EditorContent editor={editor} /></div>)}diff --git a/apps/web/src/components/editor/EditorBlockDragHandle.tsx b/apps/web/src/components/editor/EditorBlockDragHandle.tsxdeleted file mode 100644index 570c4b20..00000000--- a/apps/web/src/components/editor/EditorBlockDragHandle.tsx+++ /dev/null@@ -1,47 +0,0 @@-import { useEffect } from "react";-import type { Editor } from "@tiptap/react";-import DragHandle from "@tiptap/extension-drag-handle-react";-import { GripVertical } from "lucide-react";-import { useTranslation } from "react-i18next";--const BLOCK_DRAG_HANDLE_CLASS_NAME = "edgeever-block-drag-handle";--const isBlockDragHandleEvent = (event: DragEvent) => {- const target = event.target;- return target instanceof Element && Boolean(target.closest(`.${BLOCK_DRAG_HANDLE_CLASS_NAME}`));-};--/** TipTap clears dataTransfer during dragstart; Chrome then refuses the drop unless a type remains. */-const retainBlockDragDataTransfer = (event: DragEvent) => {- if (!isBlockDragHandleEvent(event) || !event.dataTransfer) {- return;- }- event.dataTransfer.effectAllowed = "move";- if (![...event.dataTransfer.types].includes("text/plain")) {- event.dataTransfer.setData("text/plain", " ");- }-};--export const EditorBlockDragHandle = ({ editor }: { editor: Editor }) => {- const { t } = useTranslation();-- useEffect(() => {- document.addEventListener("dragstart", retainBlockDragDataTransfer);- return () => document.removeEventListener("dragstart", retainBlockDragDataTransfer);- }, []);-- if (editor.isDestroyed || !editor.isEditable) {- return null;- }-- return (- <DragHandle- editor={editor}- className={BLOCK_DRAG_HANDLE_CLASS_NAME}- nested- >- <span className="sr-only">{t("editor.dragHandle")}</span>- <GripVertical aria-hidden="true" className="h-4 w-4" />- </DragHandle>- );-};diff --git a/apps/web/src/styles/globals.css b/apps/web/src/styles/globals.cssindex d18bf5c7..710283f8 100644--- a/apps/web/src/styles/globals.css+++ b/apps/web/src/styles/globals.css@@ -924,54 +924,6 @@ html[data-edgeever-extension-theme] .edgeever-memo-divider {font-feature-settings: "chws" 1;}-.edgeever-block-drag-handle {- z-index: 20;- display: none;- width: 1.25rem;- height: 1.5rem;- align-items: center;- justify-content: center;- cursor: grab;- border-radius: 0.25rem;- color: #94a3b8;-}--.edgeever-block-drag-handle:hover {- background: #f1f5f9;- color: #16a06e;-}--.edgeever-block-drag-handle:active,-.edgeever-block-drag-handle[data-dragging="true"] {- cursor: grabbing;-}--@media (min-width: 1024px) {- .edgeever-block-drag-handle {- display: flex;- }-}--.ProseMirror-selectednoderange {- border-radius: 0.25rem;- background: rgb(22 160 110 / 0.06);- outline: 2px solid rgb(22 160 110 / 0.28);-}--:root.dark .edgeever-block-drag-handle {- color: #64748b;-}--:root.dark .edgeever-block-drag-handle:hover {- background: #1e293b;- color: #34d399;-}--:root.dark .ProseMirror-selectednoderange {- background: rgb(52 211 153 / 0.1);- outline-color: rgb(52 211 153 / 0.35);-}-.ProseMirror [data-type="details"] {display: flex;align-items: flex-start;diff --git a/bun.lock b/bun.lockindex 667f8a10..5fa3fe60 100644--- a/bun.lock+++ b/bun.lock@@ -28,11 +28,8 @@"@tiptap/core": "3.31.0","@tiptap/extension-collaboration": "3.31.0","@tiptap/extension-details": "3.31.0",- "@tiptap/extension-drag-handle": "3.31.0",- "@tiptap/extension-drag-handle-react": "3.31.0","@tiptap/extension-image": "3.31.0","@tiptap/extension-list": "3.31.0",- "@tiptap/extension-node-range": "3.31.0","@tiptap/extension-placeholder": "3.31.0","@tiptap/extension-table": "3.31.0","@tiptap/pm": "3.31.0",@@ -1441,10 +1438,6 @@"@tiptap/extension-document": ["@tiptap/[email protected]", "", { "peerDependencies": { "@tiptap/core": "3.31.0" } }, "sha512-C2eDFoBlcRAb4sgbc9ZH+mrFFbjIS9VyoERGeDum3QRdqLEKU1h14Th7isHpGQzTvTywhXQxqXC64mgeSGXLsA=="],- "@tiptap/extension-drag-handle": ["@tiptap/[email protected]", "", { "dependencies": { "@floating-ui/dom": "^1.6.13" }, "peerDependencies": { "@tiptap/core": "3.31.0", "@tiptap/extension-collaboration": "3.31.0", "@tiptap/extension-node-range": "3.31.0", "@tiptap/pm": "3.31.0", "@tiptap/y-tiptap": "^3.0.7" } }, "sha512-v04z6nHLGaxC0EYJ6hhWzsl01LfuiMLseTXYEqls5nnl0nmYntPBiwHX2ZoHJ5e42qi76nVO2G06fyigUsI10w=="],-- "@tiptap/extension-drag-handle-react": ["@tiptap/[email protected]", "", { "peerDependencies": { "@tiptap/extension-drag-handle": "3.31.0", "@tiptap/pm": "3.31.0", "@tiptap/react": "3.31.0", "react": "^16.8 || ^17 || ^18 || ^19", "react-dom": "^16.8 || ^17 || ^18 || ^19" } }, "sha512-sDAUF5HS0aytRjhbX+jnHzkD695W9Ha4B2SkOcpM1wDSmaYbTdgkwaFh2BZPkd+Hb/J2kdBgjR+ceZE9FU6R2Q=="],-"@tiptap/extension-dropcursor": ["@tiptap/[email protected]", "", { "peerDependencies": { "@tiptap/extensions": "3.31.0" } }, "sha512-hIZOPfM0sGkAhPV69IK1zWMbWBd3wmhS0XCKBRcXUWrE2MW4kkaSyYprSFqtqFuUa3lVIEFrlME1WOEBJ2/2rg=="],"@tiptap/extension-floating-menu": ["@tiptap/[email protected]", "", { "peerDependencies": { "@floating-ui/dom": "^1.0.0", "@tiptap/core": "3.31.0", "@tiptap/pm": "3.31.0" } }, "sha512-NFwv1Kah3zGLmjj53Z+pA2584GdgMDClgvebJPqSunsSdHwHlFwfu+Op1u73xuEYOd6wGgCgzzDZ3V4CKwkJqg=="],@@ -1471,8 +1464,6 @@"@tiptap/extension-mathematics": ["@tiptap/[email protected]", "", { "peerDependencies": { "@tiptap/core": "3.31.0", "@tiptap/pm": "3.31.0", "katex": "^0.16.4 || ^0.17.0 || ^0.18.0" } }, "sha512-wr3L8zb/jGWPeYb7xvn5AUqUz/ORR6V/kFRGqmZwdM45ksU2txt06Jj16eu5uiUDdGIcLgx0QiMw6hgUyJZAQg=="],- "@tiptap/extension-node-range": ["@tiptap/[email protected]", "", { "peerDependencies": { "@tiptap/core": "3.31.0", "@tiptap/pm": "3.31.0" } }, "sha512-QiBWWVdnmQHMKRKrN4UySUaqqTK2jjqZL6Jtz6xFzrrZYI/iS91Uf0J6g4NaM6dfm+8ODUBL8m7aHeYbGZam6A=="],-"@tiptap/extension-ordered-list": ["@tiptap/[email protected]", "", { "peerDependencies": { "@tiptap/extension-list": "3.31.0" } }, "sha512-KLCax7pI/3JTCkMY01n2+CXwZRPPsIVR1fvSmkFMryUPonkkMYWSUlXCuYKvF22+kM0gU0kiXsVjqsn/YFdeDg=="],"@tiptap/extension-paragraph": ["@tiptap/[email protected]", "", { "peerDependencies": { "@tiptap/core": "3.31.0" } }, "sha512-78l9D/jpKvvWXrBBzYPfgqwonBY76+1MMgSovkPffIbya+jaYDJdZhIpeCZXtSBDnw8cYE/rheAeusN1QG3SVQ=="],diff --git a/package.json b/package.jsonindex 299289b7..5a33edab 100644--- a/package.json+++ b/package.json@@ -141,11 +141,8 @@"@tiptap/core": "3.31.0","@tiptap/extension-collaboration": "3.31.0","@tiptap/extension-details": "3.31.0",- "@tiptap/extension-drag-handle": "3.31.0",- "@tiptap/extension-drag-handle-react": "3.31.0","@tiptap/extension-image": "3.31.0","@tiptap/extension-list": "3.31.0",- "@tiptap/extension-node-range": "3.31.0","@tiptap/extension-placeholder": "3.31.0","@tiptap/extension-table": "3.31.0","@tiptap/pm": "3.31.0",diff --git a/packages/shared/src/i18n/en-US.ts b/packages/shared/src/i18n/en-US.tsindex 16267d59..5197cddd 100644--- a/packages/shared/src/i18n/en-US.ts+++ b/packages/shared/src/i18n/en-US.ts@@ -2057,7 +2057,6 @@ export const enUS = {},placeholder: "space for AI · / commands · @ notes",placeholderCommands: "/ commands · @ notes",- dragHandle: "Drag block",noteBodyAria: "Note body",markdownSourceAria: "Markdown source",richTableSourceProtection: "This table cell has rich content that Markdown cannot fully represent. The last change was not applied. Edit this structure in rich text view; source outside the cell remains editable.",diff --git a/packages/shared/src/i18n/ja.ts b/packages/shared/src/i18n/ja.tsindex 05e24716..dee26eb5 100644--- a/packages/shared/src/i18n/ja.ts+++ b/packages/shared/src/i18n/ja.ts@@ -2057,7 +2057,6 @@ export const ja = {},placeholder: "スペースで AI · / コマンド · @ ノート",placeholderCommands: "/ コマンド · @ ノート",- dragHandle: "ブロックをドラッグ",noteBodyAria: "ノート本文",markdownSourceAria: "Markdown ソース",richTableSourceProtection: "この表のセルには Markdown で完全に表現できないリッチテキスト構造があります。直前の変更は適用されませんでした。この構造はリッチテキスト表示で編集してください。セル以外のソースは編集できます。",diff --git a/packages/shared/src/i18n/pl.ts b/packages/shared/src/i18n/pl.tsindex 5101ffe5..a52c8cc4 100644--- a/packages/shared/src/i18n/pl.ts+++ b/packages/shared/src/i18n/pl.ts@@ -2057,7 +2057,6 @@ export const pl = {},placeholder: "spacja: AI · /: polecenia · @: notatki",placeholderCommands: "/: polecenia · @: notatki",- dragHandle: "Przeciągnij blok",noteBodyAria: "Treść notatki",markdownSourceAria: "Źródło Markdown",richTableSourceProtection: "Ta komórka tabeli zawiera sformatowaną treść, której Markdown nie potrafi w pełni odwzorować. Ostatnia zmiana nie została zastosowana. Edytuj tę strukturę w widoku tekstu sformatowanego; źródło poza komórką nadal można edytować.",diff --git a/packages/shared/src/i18n/zh-CN.ts b/packages/shared/src/i18n/zh-CN.tsindex b596647e..7e0568b4 100644--- a/packages/shared/src/i18n/zh-CN.ts+++ b/packages/shared/src/i18n/zh-CN.ts@@ -2057,7 +2057,6 @@ export const zhCN = {},placeholder: "空格唤起 AI · / 命令 · @ 引用",placeholderCommands: "/ 命令 · @ 引用",- dragHandle: "拖动块",noteBodyAria: "笔记正文",markdownSourceAria: "Markdown 源码",richTableSourceProtection: "这处表格单元格含有 Markdown 无法完整表示的富文本结构。刚才的修改未应用;请在富文本视图中修改该结构,表格外的源码仍可编辑。",