Tiptap RTE: Add delete action support for RTE blocks (closes #21345)#21615
Merged
iOvergaard merged 1 commit intomainfrom Feb 4, 2026
Merged
Tiptap RTE: Add delete action support for RTE blocks (closes #21345)#21615iOvergaard merged 1 commit intomainfrom
iOvergaard merged 1 commit intomainfrom
Conversation
Adds a delete button to RTE block entries that removes blocks from both the editor HTML and the block manager data. Implements an HTML-first deletion approach that enables Ctrl+Z undo support by leveraging the existing _filterUnusedBlocks mechanism. - Add delete button to block-rte-entry action bar - Add pendingDeletions state to manager for HTML-first deletion flow - Modify entries context to use pending deletion mechanism - Add Tiptap API observer to process pending deletions - Remove blocks from editor via ProseMirror transactions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
iOvergaard
approved these changes
Feb 4, 2026
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.
Prerequisites
Description
Adds a delete button to RTE block entries that removes blocks from both the editor HTML and the block manager data. Implements an HTML-first deletion approach that enables Ctrl+Z undo support by leveraging the existing
_filterUnusedBlocksmechanism.This is a partial fix towards #21345.
Changes
pendingDeletionsstate and methods for HTML-first deletion flowdelete()to use pending deletion mechanismHow it works
pendingDeletionson the managerpendingDeletions→ removes HTML from editor (creating undo history)onUpdatefires →_filterUnusedBlocksruns_filterUnusedBlocksstores block data in lookup maps (enabling undo) and removes from manager_restoreUnusedBlocksrestores dataHow to test
🤖 Generated with Claude Code