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