mirror of https://github.com/fantasticit/think.git
commit
15b14fd173
|
@ -70,10 +70,10 @@ export const EditorInstance = forwardRef((props: IProps, ref) => {
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
].filter(Boolean),
|
].filter(Boolean),
|
||||||
onTransaction({ transaction }) {
|
onUpdate({ transaction }) {
|
||||||
try {
|
try {
|
||||||
const title = transaction.doc.content.firstChild.content.firstChild.textContent;
|
const title = transaction.doc.content.firstChild.content.firstChild?.textContent;
|
||||||
onTitleUpdate(title);
|
onTitleUpdate(title || '未命名文档');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue