mirror of
https://github.com/fantasticit/think.git
synced 2026-10-30 22:56:06 +08:00
feat(tiptap): add default tilte
This commit is contained in:
@@ -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) {
|
||||
//
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user