feat: add block suite editor sample

This commit is contained in:
lawvs
2022-10-12 12:16:54 +08:00
parent 2f0c76ff0e
commit 56196a5bb3
2 changed files with 36 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
import type { EditorContainer } from '@blocksuite/editor';
import '@blocksuite/blocks';
import '@blocksuite/editor';
import '@blocksuite/blocks/style';
export const Editor = () => {
return (
<div>
Editor
<editor-container />
</div>
);
};
declare global {
interface HTMLElementTagNameMap {
'editor-container': EditorContainer;
}
namespace JSX {
interface IntrinsicElements {
// TODO fix type error
'editor-container': any; // EditorContainer
}
}
}
export default Editor;