File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 33 createDocument ,
44 EditorOptions ,
55 Extension ,
6+ FocusPosition ,
67 getSchema ,
78 InputRule ,
89 isNodeSelection ,
@@ -156,6 +157,13 @@ export type BlockNoteEditorOptions<
156157 */
157158 animations ?: boolean ;
158159
160+ /**
161+ * Whether the editor should be focused automatically when it's created.
162+ *
163+ * @default false
164+ */
165+ autofocus ?: FocusPosition ;
166+
159167 /**
160168 * When enabled, allows for collaboration between multiple users.
161169 * See [Real-time Collaboration](https://www.blocknotejs.org/docs/advanced/real-time-collaboration) for more info.
@@ -850,6 +858,7 @@ export class BlockNoteEditor<
850858 ...blockNoteTipTapOptions ,
851859 ...newOptions . _tiptapOptions ,
852860 element : null ,
861+ autofocus : newOptions . autofocus ?? false ,
853862 extensions : tiptapExtensions ,
854863 editorProps : {
855864 ...newOptions . _tiptapOptions ?. editorProps ,
You can’t perform that action at this time.
0 commit comments