change Editor information
This commit is contained in:
parent
52c33a9940
commit
6b6761f7bb
@ -17,7 +17,6 @@ const TextbookEditor: React.FC<EditorProps> = ({
|
||||
}) => {
|
||||
const [isEditing, setIsEditing] = useState(false);
|
||||
const { t } = useTranslation();
|
||||
|
||||
// editor 实例
|
||||
const [editor, setEditor] = useState<IDomEditor | null>(null); // TS 语法
|
||||
|
||||
@ -37,10 +36,10 @@ const TextbookEditor: React.FC<EditorProps> = ({
|
||||
setIsEditing(false);
|
||||
|
||||
// 更新统计
|
||||
const text = editor.getText();
|
||||
// const text = editor.getText();
|
||||
// setWordCount(text.split(/\s+/).filter((word) => word.length > 0).length);
|
||||
}
|
||||
}, []);
|
||||
}, [initialContent, editor, chapterTitle]);
|
||||
|
||||
// 工具栏配置
|
||||
const toolbarConfig: Partial<IToolbarConfig> = {}; // TS 语法
|
||||
|
||||
Loading…
Reference in New Issue
Block a user