mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 09:36:17 +08:00
feat: add dark mode switch & export
This commit is contained in:
@@ -4,16 +4,13 @@ import { Text } from '@blocksuite/store';
|
||||
import '@blocksuite/blocks';
|
||||
import '@blocksuite/editor';
|
||||
import '@blocksuite/blocks/style';
|
||||
import { useEditor } from '@/components/editor-provider';
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
editor: EditorContainer;
|
||||
}
|
||||
}
|
||||
export const Editor = () => {
|
||||
const editorRef = useRef<EditorContainer>();
|
||||
|
||||
const { setEditor } = useEditor();
|
||||
useEffect(() => {
|
||||
setEditor(editorRef.current!);
|
||||
const { store } = editorRef.current as EditorContainer;
|
||||
|
||||
const pageId = store.addBlock({
|
||||
|
||||
Reference in New Issue
Block a user