feat(tiptap): add default tilte

This commit is contained in:
weikx 2022-06-18 14:24:42 +08:00
parent 854f796a58
commit 87cb551be4
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ export const EditorInstance = forwardRef((props: IProps, ref) => {
onUpdate({ transaction }) {
try {
const title = transaction.doc.content.firstChild.content.firstChild?.textContent;
onTitleUpdate(title);
onTitleUpdate(title || '未命名文档');
} catch (e) {
//
}