mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 17:16:16 +08:00
feat: add block suite editor sample
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user