tw ← Tiptap WYSIWYG: comparison/diff mode (CMS-2649) - #27879
Merged
alvarosabu merged 9 commits intoJul 14, 2026
Conversation
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.
Scope
Adds comparison/diff mode (content versioning and revision diffs) to the new Tiptap WYSIWYG editor. The comparison view already special-cases
input-rich-text-htmlfields (use-comparison.tscomputes the diff and feeds pre-marked HTML as the field value); this PR adds the interface side that renders it.What's changed
ComparisonDiffmark (extensions/comparison-diff.ts): letsspan.comparison-diff--added/--removedspans (produced byuse-comparison-diff.ts) survive schema parsing. Registered only in comparison mode — the normal editing schema still strips diff spans, so they can never leak into saved content.comparisonMode/comparisonSideprops on the interface (passed generically byform-field-interface.vue).comparisonSideis API surface only — side switches flow in as value changes.Potential Risks / Drawbacks
ComparisonDiffjoins the schema at editor construction based oncomparisonMode. The comparison view mounts the interface fresh per comparison, so deciding at construction is safe; a hypothetical runtime toggle of the prop would not re-register the extension.reconstructComparisonHtmlconcern, not introduced here).Tested Scenarios
non-editableclass applied, diff-marked value rendered intact.input-rich-text-htmlsuite (256 tests) passes.Review Notes / Questions
feat/wysiwyg-tiptap, notmain.Checklist
Closes CMS-2649