File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,6 +120,20 @@ export interface BlockNoteEditorOptions<
120120 */
121121 domAttributes ?: Partial < BlockNoteDOMAttributes > ;
122122
123+ /**
124+ * Additional ProseMirror editor props to pass to the underlying editor view.
125+ * Use this to configure options such as `scrollMargin`, `scrollThreshold`,
126+ * `handleDOMEvents`, and other
127+ * [ProseMirror EditorProps](https://prosemirror.net/docs/ref/#view.EditorProps).
128+ *
129+ * Note: `attributes` (use {@link domAttributes} instead) and `transformPasted`
130+ * are managed by BlockNote and cannot be overridden here.
131+ */
132+ editorProps ?: Omit <
133+ NonNullable < EditorOptions [ "editorProps" ] > ,
134+ "attributes" | "transformPasted"
135+ > ;
136+
123137 /**
124138 * Options for configuring the drop cursor behavior when dragging and dropping blocks.
125139 * Allows customization of cursor appearance and drop position computation through hooks.
@@ -520,6 +534,7 @@ export class BlockNoteEditor<
520534 extensions : tiptapExtensions ,
521535 editorProps : {
522536 ...newOptions . _tiptapOptions ?. editorProps ,
537+ ...newOptions . editorProps ,
523538 attributes : {
524539 // As of TipTap v2.5.0 the tabIndex is removed when the editor is not
525540 // editable, so you can't focus it. We want to revert this as we have
You can’t perform that action at this time.
0 commit comments