From 82b69ea74763e269da51232019b1cb4c4dac9734 Mon Sep 17 00:00:00 2001 From: Wqrld Date: Sat, 30 May 2026 22:14:31 +0200 Subject: [PATCH 1/2] fix(core): call scrollIntoView() on Enter updates the enter handler to scrollintoview both globally and for listItems. Signed-off-by: Wqrld --- packages/core/src/blocks/utils/listItemEnterHandler.ts | 4 +++- .../KeyboardShortcuts/KeyboardShortcutsExtension.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/core/src/blocks/utils/listItemEnterHandler.ts b/packages/core/src/blocks/utils/listItemEnterHandler.ts index ceb383a611..edd470513f 100644 --- a/packages/core/src/blocks/utils/listItemEnterHandler.ts +++ b/packages/core/src/blocks/utils/listItemEnterHandler.ts @@ -34,7 +34,9 @@ export const handleEnter = ( } else if (blockContent.node.childCount > 0) { return editor.transact((tr) => { tr.deleteSelection(); - return splitBlockTr(tr, tr.selection.from, true); + const result = splitBlockTr(tr, tr.selection.from, true); + tr.scrollIntoView(); + return result; }); } diff --git a/packages/core/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts b/packages/core/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts index 44bda036bb..061d0dd88d 100644 --- a/packages/core/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +++ b/packages/core/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts @@ -922,6 +922,7 @@ export const KeyboardShortcutsExtension = Extension.create<{ selectionAtBlockStart, ), ) + .scrollIntoView() .run(); return true; From 360d5d1d8051ffbfc2b10dfeb35db9e1bf331bd9 Mon Sep 17 00:00:00 2001 From: Wqrld Date: Sun, 31 May 2026 11:02:33 +0200 Subject: [PATCH 2/2] feat: Make editorprops public --- packages/core/src/editor/BlockNoteEditor.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/core/src/editor/BlockNoteEditor.ts b/packages/core/src/editor/BlockNoteEditor.ts index e4888f50f6..71c8e0b8f2 100644 --- a/packages/core/src/editor/BlockNoteEditor.ts +++ b/packages/core/src/editor/BlockNoteEditor.ts @@ -120,6 +120,20 @@ export interface BlockNoteEditorOptions< */ domAttributes?: Partial; + /** + * Additional ProseMirror editor props to pass to the underlying editor view. + * Use this to configure options such as `scrollMargin`, `scrollThreshold`, + * `handleDOMEvents`, and other + * [ProseMirror EditorProps](https://prosemirror.net/docs/ref/#view.EditorProps). + * + * Note: `attributes` (use {@link domAttributes} instead) and `transformPasted` + * are managed by BlockNote and cannot be overridden here. + */ + editorProps?: Omit< + NonNullable, + "attributes" | "transformPasted" + >; + /** * Options for configuring the drop cursor behavior when dragging and dropping blocks. * Allows customization of cursor appearance and drop position computation through hooks. @@ -520,6 +534,7 @@ export class BlockNoteEditor< extensions: tiptapExtensions, editorProps: { ...newOptions._tiptapOptions?.editorProps, + ...newOptions.editorProps, attributes: { // As of TipTap v2.5.0 the tabIndex is removed when the editor is not // editable, so you can't focus it. We want to revert this as we have