You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/website/docs/docs/editor.md
+7-4
Original file line number
Diff line number
Diff line change
@@ -7,20 +7,21 @@ While you can get started with BlockNote in minutes, it's likely that you'll wan
7
7
There are a number of options that you can pass to `useBlockNote()`, which you can use to customize the editor. You can find the full list of these below:
`initialContent:` The content that should be in the editor when it's created, represented as an array of [partial block objects](/docs/manipulating-blocks#partial-blocks).
22
23
23
-
`editorDOMAttributes:` An object containing attributes that should be added to the editor's HTML element.
24
+
`editorDOMAttributes:` An object containing attributes that should be added to the editor's HTML element. For example, you can pass `{ class: "my-editor-class" }` to set a custom class name.
24
25
25
26
`onEditorReady:` A callback function that runs when the editor is ready to be used.
26
27
@@ -32,6 +33,8 @@ export type BlockNoteEditorOptions = {
32
33
33
34
`uiFactories:` Factories used to create a custom UI for BlockNote, which you can find out more about in [Creating Your Own UI Elements](/docs/vanilla-js#creating-your-own-ui-elements).
34
35
36
+
`defaultStyles`: Whether to use the default font and reset the styles of `<p>`, `<li>`, `<h1>`, etc. elements that are used in BlockNote. Defaults to true if undefined.
37
+
35
38
## Demo: Saving & Restoring Editor Contents
36
39
37
40
By default, BlockNote doesn't preserve the editor contents when your app is reopened or refreshed. However, using the editor options, you can change this by using the editor options.
0 commit comments