feat: blocksuite integration for pageMode & pageUpdatedAt (#5849)

Co-authored-by: LongYinan <lynweklm@gmail.com>
This commit is contained in:
Ayush Agrawal
2024-02-21 12:33:02 +05:30
committed by GitHub
parent 4641bc422b
commit 11b3184537
2 changed files with 42 additions and 6 deletions
@@ -86,8 +86,14 @@ const PageDetailEditorMain = memo(function PageDetailEditorMain({
})
);
localStorage.setItem('last_page_id', page.id);
if (onLoad) {
disposableGroup.add(onLoad(page, editor));
// Invoke onLoad once the editor has been mounted to the DOM.
editor.updateComplete
.then(() => {
disposableGroup.add(onLoad(page, editor));
})
.catch(console.error);
}
return () => {