fix: remove unused code

This commit is contained in:
fantasticit 2022-04-05 13:46:08 +08:00
parent 56fa309285
commit 57146873e7
3 changed files with 0 additions and 38 deletions

View File

@ -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({

View File

@ -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();

View File

@ -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 (
<NodeViewWrapper as="span" className={styles.wrap} contentEditable={false}>
<Checkbox checked={checked} onChange={(e) => updateAttributes({ checked: e.target.checked })} />