diff --git a/packages/editor/src/hooks/use-editor.ts b/packages/editor/src/hooks/use-editor.ts index b28759c7e..fadceb68c 100644 --- a/packages/editor/src/hooks/use-editor.ts +++ b/packages/editor/src/hooks/use-editor.ts @@ -17,14 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -import { - AnyConfig, - EditorOptions, - Editor as TiptapEditor, - createDocument, - getExtensionField, - resolveFocusPosition -} from "@tiptap/core"; +import { EditorOptions, Editor as TiptapEditor } from "@tiptap/core"; import { DependencyList, useEffect, useMemo, useRef, useState } from "react"; import { Editor } from "../types.js"; import { useToolbarStore } from "../toolbar/stores/toolbar-store.js"; @@ -36,9 +29,6 @@ function useForceUpdate() { return () => setValue((value) => value + 1); } -// TODO: remove -const bindings: Record = {}; - export const useEditor = ( options: Partial = {}, deps: DependencyList = [] @@ -47,21 +37,6 @@ export const useEditor = ( const forceUpdate = useForceUpdate(); const editorRef = useRef(editor); - // TODO: remove - const resolvedExtensions = editor.extensionManager.extensions; - for (const extension of resolvedExtensions) { - const addKeyboardShortcuts = getExtensionField< - AnyConfig["addKeyboardShortcuts"] - >(extension, "addKeyboardShortcuts", { - name: extension.name, - options: extension.options, - storage: extension.storage, - editor - }); - bindings[extension.name] = addKeyboardShortcuts?.(); - } - console.log("bindings", bindings); - useEffect( () => { if (editor.view.isDestroyed) return;