Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/core/src/editor/BlockNoteEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
createDocument,
EditorOptions,
Extension,
FocusPosition,
getSchema,
InputRule,
isNodeSelection,
Expand Down Expand Up @@ -156,6 +157,13 @@ export type BlockNoteEditorOptions<
*/
animations?: boolean;

/**
* Whether the editor should be focused automatically when it's created.
*
* @default false
*/
autofocus?: FocusPosition;

/**
* When enabled, allows for collaboration between multiple users.
* See [Real-time Collaboration](https://www.blocknotejs.org/docs/advanced/real-time-collaboration) for more info.
Expand Down Expand Up @@ -850,6 +858,7 @@ export class BlockNoteEditor<
...blockNoteTipTapOptions,
...newOptions._tiptapOptions,
element: null,
autofocus: newOptions.autofocus ?? false,
extensions: tiptapExtensions,
editorProps: {
...newOptions._tiptapOptions?.editorProps,
Expand Down
Loading