diff --git a/packages/client/src/tiptap/extensions/mention.ts b/packages/client/src/tiptap/extensions/mention.ts index 660fa80b..6b1ab8d4 100644 --- a/packages/client/src/tiptap/extensions/mention.ts +++ b/packages/client/src/tiptap/extensions/mention.ts @@ -57,34 +57,6 @@ const suggestion = { }, }; }, - - command: ({ editor, range, props }) => { - // increase range.to by one when the next node is of type "text" - // and starts with a space character - const nodeAfter = editor.view.state.selection.$to.nodeAfter; - const overrideSpace = nodeAfter?.text?.startsWith(' '); - - if (overrideSpace) { - range.to += 1; - } - - console.log('mention', props); - - editor - .chain() - .focus() - .insertContentAt(range, [ - { - type: BulitInMention.name, - attrs: props, - }, - { - type: 'text', - text: ' ', - }, - ]) - .run(); - }, }; export const Mention = BulitInMention.configure({ diff --git a/packages/client/src/tiptap/views/float-menu.tsx b/packages/client/src/tiptap/views/float-menu.tsx index 03aed345..02a4810e 100644 --- a/packages/client/src/tiptap/views/float-menu.tsx +++ b/packages/client/src/tiptap/views/float-menu.tsx @@ -37,7 +37,6 @@ export class FloatMenuView { } if (isNodeSelection(state.selection)) { const node = view.nodeDOM(range.from) as HTMLElement; - console.log(node); if (node) { return node.getBoundingClientRect(); diff --git a/packages/client/src/tiptap/wrappers/task-item/index.tsx b/packages/client/src/tiptap/wrappers/task-item/index.tsx index a07667f5..0a4bf134 100644 --- a/packages/client/src/tiptap/wrappers/task-item/index.tsx +++ b/packages/client/src/tiptap/wrappers/task-item/index.tsx @@ -1,19 +1,10 @@ import { NodeViewWrapper, NodeViewContent } from '@tiptap/react'; -import { useEffect, useMemo } from 'react'; -import { Popover, TextArea, Typography, Space } from '@douyinfe/semi-ui'; -import { IconHelpCircle } from '@douyinfe/semi-icons'; -import katex from 'katex'; import { Checkbox } from '@douyinfe/semi-ui'; import styles from './index.module.scss'; -const { Text } = Typography; - export const TaskItemWrapper = ({ editor, node, updateAttributes }) => { - const isEditable = editor.isEditable; const { checked } = node.attrs; - console.log(node.attrs); - return ( updateAttributes({ checked: e.target.checked })} />