change Editor information

This commit is contained in:
penpenwang 2025-11-28 20:05:32 +08:00
parent 52c33a9940
commit 6b6761f7bb

View File

@ -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 语法