Repository navigation
feat(wysiwyg): Notion-style block editing (2.3.0) - #5
Merged
Merged
Conversation
`options.blockEditor` turns the WYSIWYG field into a page edited block by block: a gutter handle (`+` to insert, grip to drag or open the block menu), a hint on the empty block holding the cursor, the formatting bubble and the `/` palette instead of the fixed toolbar, and a borderless page. The handle is built on ProseMirror alone: Nuxt UI's `UEditorDragHandle` requires `@tiptap/y-tiptap`, `yjs` and `y-protocols`, which would become dependencies of every host using `/advanced`. Explicit options still win and the stored content format is unchanged. Prepares 2.3.0 (changelog/2.3.0.md, CHANGELOG.md regenerated). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…r-update-a5cae1 # Conflicts: # CHANGELOG.md
Codecov flagged uncovered patch lines: ordered list conversion, unknown actions and node types, invalid positions, a heading without level, a block without rendered element and an unknown density in block mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
New
options.blockEditor(boolean | { dragHandle, placeholders, bordered }) on the WYSIWYG renderer, for Notion-style block editing:+inserts a block below and opens the/palette when it is on.Heading 2, or "type '/'"). The hostplaceholderis kept while the document is empty./palette replace the fixed toolbar, and the page is borderless with a left gutter. Explicittoolbar,bubbleMenu,slashCommandsanddensityoptions still win./advanced(resolveWysiwygBlockEditor,buildWysiwygBlockMenu,runWysiwygBlockAction, …).nuxt-wysiwyg-blocks), the docs props andchangelog/2.3.0.mdare added, andCHANGELOG.mdis regenerated.Why not
UEditorDragHandleNuxt UI's drag handle uses
@tiptap/extension-drag-handle, which requires@tiptap/y-tiptap,yjsandy-protocols. The Vite import fails without them, and adding them would make them dependencies of every host using/advanced. This handle is built on ProseMirror alone (view.draggingandserializeForClipboard), so it adds no dependency.Release order
mainholds the unreleased 2.2.0; merging this first would ship the block editor inside 2.2.0.Before 2.2.0 is published,
changelog/2.2.0.mdalso needs a fix onmain: it declaresprevious: 2.1.1, a version that was never tagged or published.Checks
block.ts98.8%),docs:build, the MCP build,package:check,changelog:checkandtest:scriptsall pass. The browser recipe passes 10/10, including "./core ships no Tiptap".+inserts a block and opens/.view.dragging.Known limits / not verified
sm.🤖 Generated with Claude Code