Repository navigation
[WC-3647] Combine seven rich text fixes - #2495
Open
samuelreichert wants to merge 7 commits into
Open
samuelreichert wants to merge 7 commits into
samuelreichert wants to merge 7 commits into
Conversation
…yle mode Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
This was referenced Oct 28, 2026
Closed
Contributor
AI Code Review
What was reviewed
Skipped (out of scope): Findings
|
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.
Pull request type
Bug fix (non-breaking change which fixes an issue)
Description
This PR combines seven Rich Text bug fixes into one branch, based on the latest
main, so they can be reviewed, tested and released together. Each fix stays a separate commit.Included PRs (this PR supersedes them):
1. Class style mode loses text color, font family and size (#2454)
With Style data format = Class, these marks are saved as
<span data-text-color|data-font-family|data-font-size class="has-…">with nostyleattribute. Tiptap'sTextStylemark only parses a<span>that has astyleattribute, so the formatting was dropped when the content was loaded again.A new
TextStyleClassextension extendsTextStyleand, in class mode only, adds a parse rule for spans with these data attributes. Inline mode is unchanged.2. On change runs on every blur (#2456)
With On change type = When user leaves input field, On change ran on every blur, even without an edit. A dirty flag is now set by a real edit (
onUpdate) and cleared on blur. External value syncs useemitUpdate: false, so they never set it. On leave still runs on every blur.Out of scope: clicking a toolbar button also blurs the editor, so editing and then clicking the toolbar still runs On change.
3. Escape saves the typed value in configuration dropdowns (#2458)
Escape called
clearDraft()and thenblur()straight away, soonBlurcommitted the draft before the state update applied. A ref set around the Escape-triggered blur now makesonBlurskip the commit.4. Character count includes trailing line breaks (#2459)
getCharCountnow returnstext.trimEnd().length, as described in the 4.12.0 changelog. Word count and HTML character count are unchanged.5. Invalid Google Maps embed URL (#2460)
The template in
videoUrlPattern.tsusedmsid=$2instead of$3and ended with a stray". It is nowmaps.google.com/maps/ms?msid=$3&output=embed.The test-only commits of #2460 are already on
main, so only the fix commit is included here.6. "Enable spell checking" has no effect (#2465)
The setting was lost in the move from Quill to Tiptap.
EditorWrappernow passesspellChecktoEditor, which setsspellcheckon the editable area, as 4.x did.role: "textbox"is set explicitly in the same attributes, becauseuseEditorreplaces them on re-render. Existing snapshots only gainspellcheck="true".7. "Default font family" and "Default font size" have no effect (#2466)
These settings were also lost in the move to Tiptap. As in 4.x, they do not apply a font to the content. They set the initial value of the font family and font size toolbar dropdowns when the selection has no font of its own.
14to14px.Notes on combining
### Fixedlist under[Unreleased].main.EditorWrapperpasses bothspellCheckand the default font props toEditor.All fixes were written test-first. In
rich-text-web: 41 test suites and 640 tests pass,tsc --noEmitis clean, and lint has 0 errors. The lint warnings are the same as onmain.What should be covered while testing?
style. Repeat with Inline: nothing changed.abcand press Enter twice. The count stays at 3.https://maps.google.com/maps/ms?…&msid=<id>link in the video dialog. The embed URL is well-formed.🤖 Generated with Claude Code