mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 06:18:45 +08:00
chore: merge blocksuite source code (#9213)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import '../../../style.css';
|
||||
|
||||
import { createEmptyDoc, PageEditor } from '@blocksuite/presets';
|
||||
import { Text } from '@blocksuite/store';
|
||||
|
||||
const doc = createEmptyDoc().init();
|
||||
const editor = new PageEditor();
|
||||
editor.doc = doc;
|
||||
document.body.append(editor);
|
||||
|
||||
const paragraphs = doc.getBlockByFlavour('affine:paragraph');
|
||||
const paragraph = paragraphs[0];
|
||||
doc.updateBlock(paragraph, { text: new Text('Hello World!') });
|
||||
Reference in New Issue
Block a user