fix(tiptap): fix #83

pull/84/head
weikx 2022-06-18 14:22:36 +08:00
parent a03312b816
commit 854f796a58
1 changed files with 2 additions and 2 deletions

View File

@ -70,9 +70,9 @@ export const EditorInstance = forwardRef((props: IProps, ref) => {
},
}),
].filter(Boolean),
onTransaction({ transaction }) {
onUpdate({ transaction }) {
try {
const title = transaction.doc.content.firstChild.content.firstChild.textContent;
const title = transaction.doc.content.firstChild.content.firstChild?.textContent;
onTitleUpdate(title);
} catch (e) {
//