Skip to content

feat: Trailing block extension rewrite#2733

Open
matthewlipski wants to merge 10 commits intomainfrom
trailing-block-update
Open

feat: Trailing block extension rewrite#2733
matthewlipski wants to merge 10 commits intomainfrom
trailing-block-update

Conversation

@matthewlipski
Copy link
Copy Markdown
Collaborator

Summary

Rationale

Changes

Impact

Testing

Screenshots/Video

Checklist

  • Code follows the project's coding standards.
  • Unit tests covering the new feature have been added.
  • All existing tests pass.
  • The documentation has been updated to reflect the new feature

Additional Notes

@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blocknote Ready Ready Preview May 11, 2026 4:29pm
blocknote-website Ready Ready Preview May 11, 2026 4:29pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Important

Review skipped

Too many files!

This PR contains 242 files, which is 92 over the limit of 150.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1d8a16df-27dc-4e5b-8bca-23c4576ff902

📥 Commits

Reviewing files that changed from the base of the PR and between 41b9151 and 01c0def.

⛔ Files ignored due to path filters (33)
  • packages/core/src/api/blockManipulation/commands/insertBlocks/__snapshots__/insertBlocks.test.ts.snap is excluded by !**/*.snap, !**/__snapshots__/**
  • packages/core/src/api/blockManipulation/commands/mergeBlocks/__snapshots__/mergeBlocks.test.ts.snap is excluded by !**/*.snap, !**/__snapshots__/**
  • packages/core/src/api/blockManipulation/commands/moveBlocks/__snapshots__/moveBlocks.test.ts.snap is excluded by !**/*.snap, !**/__snapshots__/**
  • packages/core/src/api/blockManipulation/commands/nestBlock/__snapshots__/nestBlock.test.ts.snap is excluded by !**/*.snap, !**/__snapshots__/**
  • packages/core/src/api/blockManipulation/commands/replaceBlocks/__snapshots__/replaceBlocks.test.ts.snap is excluded by !**/*.snap, !**/__snapshots__/**
  • packages/core/src/api/blockManipulation/commands/splitBlock/__snapshots__/splitBlock.test.ts.snap is excluded by !**/*.snap, !**/__snapshots__/**
  • packages/core/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap is excluded by !**/*.snap, !**/__snapshots__/**
  • packages/core/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-editor-forked.json is excluded by !**/__snapshots__/**
  • packages/core/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-editor.json is excluded by !**/__snapshots__/**
  • packages/core/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-forked.html is excluded by !**/__snapshots__/**
  • packages/core/src/extensions/Collaboration/__snapshots__/fork-yjs-snap.html is excluded by !**/__snapshots__/**
  • packages/xl-multi-column/src/test/commands/__snapshots__/backspace.test.ts.snap is excluded by !**/*.snap, !**/__snapshots__/**
  • packages/xl-multi-column/src/test/commands/__snapshots__/insertBlocks.test.ts.snap is excluded by !**/*.snap, !**/__snapshots__/**
  • packages/xl-multi-column/src/test/commands/__snapshots__/moveBlocks.test.ts.snap is excluded by !**/*.snap, !**/__snapshots__/**
  • packages/xl-multi-column/src/test/commands/__snapshots__/removeBlocks.test.ts.snap is excluded by !**/*.snap, !**/__snapshots__/**
  • packages/xl-multi-column/src/test/commands/__snapshots__/replaceBlocks.test.ts.snap is excluded by !**/*.snap, !**/__snapshots__/**
  • packages/xl-multi-column/src/test/commands/__snapshots__/updateBlock.test.ts.snap is excluded by !**/*.snap, !**/__snapshots__/**
  • tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-image-toolbar-chromium-linux.png is excluded by !**/*.png
  • tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-image-toolbar-firefox-linux.png is excluded by !**/*.png
  • tests/src/end-to-end/ariakit/ariakit.test.ts-snapshots/ariakit-image-toolbar-webkit-linux.png is excluded by !**/*.png
  • tests/src/end-to-end/images/images.test.ts-snapshots/create-image-chromium-linux.png is excluded by !**/*.png
  • tests/src/end-to-end/images/images.test.ts-snapshots/create-image-firefox-linux.png is excluded by !**/*.png
  • tests/src/end-to-end/images/images.test.ts-snapshots/create-image-webkit-linux.png is excluded by !**/*.png
  • tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-webkit-linux.png is excluded by !**/*.png
  • tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-image-toolbar-chromium-linux.png is excluded by !**/*.png
  • tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-image-toolbar-firefox-linux.png is excluded by !**/*.png
  • tests/src/end-to-end/shadcn/shadcn.test.ts-snapshots/shadcn-image-toolbar-webkit-linux.png is excluded by !**/*.png
  • tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-chromium-linux.png is excluded by !**/*.png
  • tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-firefox-linux.png is excluded by !**/*.png
  • tests/src/end-to-end/static/static.test.ts-snapshots/static-rendering-equality-webkit-linux.png is excluded by !**/*.png
  • tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-image-toolbar-chromium-linux.png is excluded by !**/*.png
  • tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-image-toolbar-firefox-linux.png is excluded by !**/*.png
  • tests/src/end-to-end/theming/theming.test.ts-snapshots/dark-image-toolbar-webkit-linux.png is excluded by !**/*.png
📒 Files selected for processing (242)
  • examples/01-basic/02-block-objects/src/App.tsx
  • examples/01-basic/03-multi-column/src/App.tsx
  • examples/01-basic/04-default-blocks/src/App.tsx
  • examples/01-basic/07-selection-blocks/src/App.tsx
  • examples/01-basic/12-multi-editor/src/App.tsx
  • examples/01-basic/16-read-only-editor/src/App.tsx
  • examples/02-backend/01-file-uploading/src/App.tsx
  • examples/02-backend/03-s3/src/App.tsx
  • examples/03-ui-components/01-ui-elements-remove/src/App.tsx
  • examples/03-ui-components/02-formatting-toolbar-buttons/src/App.tsx
  • examples/03-ui-components/03-formatting-toolbar-block-type-items/src/App.tsx
  • examples/03-ui-components/04-side-menu-buttons/src/App.tsx
  • examples/03-ui-components/05-side-menu-drag-handle-items/src/App.tsx
  • examples/03-ui-components/06-suggestion-menus-slash-menu-items/src/App.tsx
  • examples/03-ui-components/07-suggestion-menus-slash-menu-component/src/App.tsx
  • examples/03-ui-components/08-suggestion-menus-emoji-picker-columns/src/App.tsx
  • examples/03-ui-components/09-suggestion-menus-emoji-picker-component/src/App.tsx
  • examples/03-ui-components/10-suggestion-menus-grid-mentions/src/App.tsx
  • examples/03-ui-components/11-uppy-file-panel/src/App.tsx
  • examples/03-ui-components/12-static-formatting-toolbar/src/App.tsx
  • examples/03-ui-components/13-custom-ui/src/App.tsx
  • examples/03-ui-components/14-experimental-mobile-formatting-toolbar/src/App.tsx
  • examples/03-ui-components/16-link-toolbar-buttons/src/App.tsx
  • examples/03-ui-components/19-suggestion-menus-grouping-ordering/src/App.tsx
  • examples/04-theming/01-theming-dom-attributes/src/App.tsx
  • examples/04-theming/02-changing-font/src/App.tsx
  • examples/04-theming/03-theming-css/src/App.tsx
  • examples/04-theming/04-theming-css-variables/src/App.tsx
  • examples/04-theming/05-theming-css-variables-code/src/App.tsx
  • examples/04-theming/06-code-block/src/App.tsx
  • examples/04-theming/07-custom-code-block/src/App.tsx
  • examples/05-interoperability/09-blocks-to-html-static-render/src/App.tsx
  • examples/05-interoperability/10-static-html-render/src/App.tsx
  • examples/06-custom-schema/01-alert-block/src/App.tsx
  • examples/06-custom-schema/02-suggestion-menus-mentions/src/App.tsx
  • examples/06-custom-schema/03-font-style/src/App.tsx
  • examples/06-custom-schema/04-pdf-file-block/src/App.tsx
  • examples/06-custom-schema/05-alert-block-full-ux/src/App.tsx
  • examples/06-custom-schema/06-toggleable-blocks/src/App.tsx
  • examples/06-custom-schema/07-configuring-blocks/src/App.tsx
  • examples/06-custom-schema/08-non-editable-block/src/App.tsx
  • packages/core/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.ts
  • packages/core/src/api/blockManipulation/setupTestEnv.ts
  • packages/core/src/editor/Block.css
  • packages/core/src/editor/BlockNoteEditor.test.ts
  • packages/core/src/extensions/TrailingNode/TrailingNode.ts
  • packages/xl-multi-column/src/test/setupTestEnv.ts
  • tests/package.json
  • tests/src/end-to-end/colors/colors.test.ts
  • tests/src/end-to-end/copypaste/copypaste.test.ts
  • tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/headings-json-chromium-linux.json
  • tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/images-json-chromium-linux.json
  • tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/nestedOrderedLists-json-chromium-linux.json
  • tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/nestedParagraphs-json-chromium-linux.json
  • tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/nestedUnorderedLists-json-chromium-linux.json
  • tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/nonEditableBlock-json-chromium-linux.json
  • tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/orderedLists-json-chromium-linux.json
  • tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/paragraphs-json-chromium-linux.json
  • tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/unorderedLists-json-chromium-linux.json
  • tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/reactInteractivity-chromium-linux.json
  • tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/reactInteractivity-firefox-linux.json
  • tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/reactInteractivity-webkit-linux.json
  • tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanillaInteractivity-chromium-linux.json
  • tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanillaInteractivity-firefox-linux.json
  • tests/src/end-to-end/customblocks/customblocks.test.ts-snapshots/vanillaInteractivity-webkit-linux.json
  • tests/src/end-to-end/dragdrop/dragdrop.test.ts
  • tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragImage-chromium-linux.json
  • tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragImage-webkit-linux.json
  • tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragPdf-chromium-linux.json
  • tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragPdf-webkit-linux.json
  • tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragdropsingle-chromium-linux.json
  • tests/src/end-to-end/dragdrop/dragdrop.test.ts-snapshots/dragdropsingle-webkit-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/addnonselectedemptyblock-chromium-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/addnonselectedemptyblock-firefox-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/addnonselectedemptyblock-webkit-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/dragHandleDocStructure-chromium-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/dragHandleDocStructure-firefox-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/dragHandleDocStructure-webkit-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandleadd-chromium-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandleadd-firefox-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandleadd-webkit-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletehoveroutsideselection-chromium-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletehoveroutsideselection-firefox-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletehoveroutsideselection-webkit-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletemultiselection-chromium-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletemultiselection-firefox-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandledeletemultiselection-webkit-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlenesteddelete-chromium-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlenesteddelete-firefox-linux.json
  • tests/src/end-to-end/draghandle/draghandle.test.ts-snapshots/draghandlenesteddelete-webkit-linux.json
  • tests/src/end-to-end/emojipicker/emojipicker.test.ts
  • tests/src/end-to-end/images/images.test.ts-snapshots/createImage-chromium-linux.json
  • tests/src/end-to-end/images/images.test.ts-snapshots/createImage-firefox-linux.json
  • tests/src/end-to-end/images/images.test.ts-snapshots/createImage-webkit-linux.json
  • tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-chromium-linux.json
  • tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-firefox-linux.json
  • tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-webkit-linux.json
  • tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-chromium-linux.json
  • tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-firefox-linux.json
  • tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-webkit-linux.json
  • tests/src/end-to-end/indentation/indentation.test.ts
  • tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentMultipleBlocks-chromium-linux.json
  • tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentMultipleBlocks-firefox-linux.json
  • tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentMultipleBlocks-webkit-linux.json
  • tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentSingleBlock-chromium-linux.json
  • tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentSingleBlock-firefox-linux.json
  • tests/src/end-to-end/indentation/indentation.test.ts-snapshots/decreaseIndentSingleBlock-webkit-linux.json
  • tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentMultipleBlocks-chromium-linux.json
  • tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentMultipleBlocks-firefox-linux.json
  • tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentMultipleBlocks-webkit-linux.json
  • tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentSingleBlock-chromium-linux.json
  • tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentSingleBlock-firefox-linux.json
  • tests/src/end-to-end/indentation/indentation.test.ts-snapshots/increaseIndentSingleBlock-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/arrowUpChecklistItem-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/arrowUpChecklistItem-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/arrowUpChecklistItem-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesMarks-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesMarks-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesMarks-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocks-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocks-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocks-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocksEmpty-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocksEmpty-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspacePreservesNestedBlocksEmpty-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspaceStartOfBlock-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspaceStartOfBlock-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/backspaceStartOfBlock-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemInputRulePreservesContent-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemInputRulePreservesContent-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemInputRulePreservesContent-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemShortcut-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemShortcut-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/bulletListItemShortcut-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRuleCheckedPreservesContent-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRuleCheckedPreservesContent-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRuleCheckedPreservesContent-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRulePreservesContent-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRulePreservesContent-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkListItemInputRulePreservesContent-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkedListItemShortcut-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkedListItemShortcut-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/checkedListItemShortcut-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesMarks-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesMarks-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesMarks-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocks-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocks-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocks-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocksEmpty-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocksEmpty-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterPreservesNestedBlocksEmpty-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterSelectionNotEmpty-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterSelectionNotEmpty-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/enterSelectionNotEmpty-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading1Shortcut-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading1Shortcut-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading1Shortcut-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading2Shortcut-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading2Shortcut-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading2Shortcut-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading3Shortcut-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading3Shortcut-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/heading3Shortcut-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemInputRulePreservesContent-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemInputRulePreservesContent-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemInputRulePreservesContent-json-webkit-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemShortcut-json-chromium-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemShortcut-json-firefox-linux.json
  • tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/numberedListItemShortcut-json-webkit-linux.json
  • tests/src/end-to-end/multicolumn/multicolumn.test.ts
  • tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-chromium-linux.json
  • tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-firefox-linux.json
  • tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-webkit-linux.json
  • tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-chromium-linux.json
  • tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-firefox-linux.json
  • tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-webkit-linux.json
  • tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-chromium-linux.json
  • tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-firefox-linux.json
  • tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-webkit-linux.json
  • tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-chromium-linux.json
  • tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-firefox-linux.json
  • tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-webkit-linux.json
  • tests/src/end-to-end/slashmenu/slashmenu.test.ts
  • tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/docStructureSnapshot-chromium-linux.json
  • tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/docStructureSnapshot-firefox-linux.json
  • tests/src/end-to-end/slashmenu/slashmenu.test.ts-snapshots/docStructureSnapshot-webkit-linux.json
  • tests/src/end-to-end/tables/tables.test.ts-snapshots/arrowKeyCells-json-chromium-linux.json
  • tests/src/end-to-end/tables/tables.test.ts-snapshots/arrowKeyCells-json-firefox-linux.json
  • tests/src/end-to-end/tables/tables.test.ts-snapshots/arrowKeyCells-json-webkit-linux.json
  • tests/src/end-to-end/tables/tables.test.ts-snapshots/cellTyping-json-chromium-linux.json
  • tests/src/end-to-end/tables/tables.test.ts-snapshots/cellTyping-json-firefox-linux.json
  • tests/src/end-to-end/tables/tables.test.ts-snapshots/cellTyping-json-webkit-linux.json
  • tests/src/end-to-end/tables/tables.test.ts-snapshots/enterMovesToCellBelow-json-chromium-linux.json
  • tests/src/end-to-end/tables/tables.test.ts-snapshots/enterMovesToCellBelow-json-firefox-linux.json
  • tests/src/end-to-end/tables/tables.test.ts-snapshots/enterMovesToCellBelow-json-webkit-linux.json
  • tests/src/end-to-end/tables/tables.test.ts-snapshots/shiftEnterNewLineInCell-json-chromium-linux.json
  • tests/src/end-to-end/tables/tables.test.ts-snapshots/shiftEnterNewLineInCell-json-firefox-linux.json
  • tests/src/end-to-end/tables/tables.test.ts-snapshots/shiftEnterNewLineInCell-json-webkit-linux.json
  • tests/src/end-to-end/tables/tables.test.ts-snapshots/tabCells-json-chromium-linux.json
  • tests/src/end-to-end/tables/tables.test.ts-snapshots/tabCells-json-firefox-linux.json
  • tests/src/end-to-end/tables/tables.test.ts-snapshots/tabCells-json-webkit-linux.json
  • tests/src/end-to-end/textalignment/textAlignment.test.ts
  • tests/src/utils/copypaste.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch trailing-block-update

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 11, 2026

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/@blocknote/ariakit@2733

@blocknote/code-block

npm i https://pkg.pr.new/@blocknote/code-block@2733

@blocknote/core

npm i https://pkg.pr.new/@blocknote/core@2733

@blocknote/mantine

npm i https://pkg.pr.new/@blocknote/mantine@2733

@blocknote/react

npm i https://pkg.pr.new/@blocknote/react@2733

@blocknote/server-util

npm i https://pkg.pr.new/@blocknote/server-util@2733

@blocknote/shadcn

npm i https://pkg.pr.new/@blocknote/shadcn@2733

@blocknote/xl-ai

npm i https://pkg.pr.new/@blocknote/xl-ai@2733

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/@blocknote/xl-docx-exporter@2733

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/@blocknote/xl-email-exporter@2733

@blocknote/xl-multi-column

npm i https://pkg.pr.new/@blocknote/xl-multi-column@2733

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/@blocknote/xl-odt-exporter@2733

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/@blocknote/xl-pdf-exporter@2733

commit: 9379722

Comment thread tests/package.json Outdated
Comment thread tests/playwright.config.ts Outdated
Comment on lines +55 to +67
const blockContainerType =
view.state.schema.nodes["blockContainer"];
const paragraphType = view.state.schema.nodes["paragraph"];
const node = blockContainerType.create(
undefined,
paragraphType.create(),
);
const insertPos = view.state.doc.content.size - 1;
const tr = view.state.tr.insert(insertPos, node);
tr.setSelection(TextSelection.create(tr.doc, insertPos + 2));
tr.scrollIntoView();
view.dispatch(tr);
view.focus();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not blocknote apis for this?

Comment on lines +75 to +97
// Maps the existing DecorationSet through the transaction, then
// incrementally adds or removes the widget only if the show/hide state
// crossed over. The underlying Decoration (and its rendered DOM) stays
// reference-stable across transactions.
function nextDecorationSet(
tr: Transaction,
oldSet: DecorationSet,
): DecorationSet {
const mapped = oldSet.map(tr.mapping, tr.doc);
const existing = mapped.find();
const wasShowing = existing.length > 0;
const shouldShow = shouldShowTrailingWidget(tr.doc);

if (!lastContentNode) {
throw new Error("Expected blockContent");
}
if (wasShowing === shouldShow) {
return mapped;
}
if (wasShowing) {
return mapped.remove(existing);
}
return mapped.add(tr.doc, [
createTrailingWidget(tr.doc.content.size - 1),
]);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants