WNomunomu 1 rok temu
rodzic
commit
732e1f9ebf

+ 0 - 28
packages/editor/src/components/CodeMirrorEditor/CodeMirrorEditor.tsx

@@ -160,36 +160,8 @@ export const CodeMirrorEditor = (props: Props): JSX.Element => {
 
   }, [onScroll, codeMirrorEditor]);
 
-
-  // const markdownTableActivatedClass = 'markdown-table-activated';
-  // const editor = codeMirrorEditor?.view;
-
-  // const handleFocusChanged = () => {
-  //   if (editor == null) {
-  //     return;
-  //   }
-  //   if (isInTable(editor)) {
-  //     setEditorClass(markdownTableActivatedClass);
-  //   }
-  //   else {
-  //     setEditorClass('');
-  //   }
-  // };
-
-  // const cursorPositionListener = EditorView.updateListener.of((v: ViewUpdate) => {
-  //   if (v.transactions.some(tr => tr.selection || tr.docChanged)) {
-  //     handleFocusChanged();
-  //   }
-  // });
-
-  // editor?.dispatch({
-  //   effects: StateEffect.appendConfig.of(cursorPositionListener),
-  // });
-
-
   const { editorClass } = useShowTableIcon(codeMirrorEditor);
 
-
   const {
     getRootProps,
     getInputProps,

+ 0 - 4
packages/editor/src/services/table-util/use-show-table-icon.ts

@@ -36,10 +36,6 @@ export const useShowTableIcon = (codeMirrorEditor?: UseCodeMirrorEditor): { edit
       }
     });
 
-    // const extension = editor?.dispatch({
-    //   effects: StateEffect.appendConfig.of(cursorPositionListener),
-    // });
-
     const cleanupFunction = codeMirrorEditor?.appendExtensions(cursorPositionListener);
 
     return cleanupFunction;