Closed Munna5553 closed 1 week ago
Hi, can you provide more details about this please? Code snippet/sandbox, bundler used, when the error gets thrown, etc?
import { BlockNoteEditor, PartialBlock } from "@blocknote/core"; import { useCreateBlockNote } from "@blocknote/react"; import { BlockNoteView } from "@blocknote/mantine" import "@blocknote/mantine/style.css";
interface editorProps { initialContent?: string; editable?: boolean; }
const TextEditor: React.FC
const editor = useCreateBlockNote({
initialContent: initialContent ? (JSON.parse(initialContent) as PartialBlock[]) : undefined,
}) as BlockNoteEditor;
return (
<BlockNoteView
onChange={() => { console.log(JSON.stringify(editor.domElement.innerHTML)) }}
editor={editor}
editable={editable}
theme={"light"}
/>
)
}
export default TextEditor;
how to get the data where is use/call this component,
please a clear doc which is really helpful us.