chore:Update blocksuite dependency version (#525)

This commit is contained in:
xiaotian
2022-11-04 15:48:29 +08:00
committed by GitHub
parent 1ccc46ec72
commit 3b830e4c4a
4 changed files with 36 additions and 26 deletions
+5 -5
View File
@@ -38,14 +38,14 @@ export const Editor = () => {
return;
}
setEditor(editorRef.current);
const { store } = editorRef.current as EditorContainer;
const pageId = store.addBlock({
flavour: 'page',
const { space } = editorRef.current as EditorContainer;
const pageId = space.addBlock({
flavour: 'affine:page',
title: 'Welcome to the AFFiNE Alpha',
});
const groupId = store.addBlock({ flavour: 'group' }, pageId);
const groupId = space.addBlock({ flavour: 'affine:group' }, pageId);
editorRef.current.clipboard.importMarkdown(exampleMarkdown, `${groupId}`);
store.resetHistory();
space.resetHistory();
}, [setEditor]);
useEffect(() => {