Skip to content

Stop using custom rich text in email editor - #6521

Merged
triple0t merged 2 commits into
trunkfrom
remove-custom-richtext
Feb 23, 2026
Merged

triple0t merged 2 commits into
trunkfrom
remove-custom-richtext

Conversation

@costasovo

@costasovo costasovo commented Feb 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

We added a custom RichText package for the email editor to support Personalization tags in WordPress 6.7.
The most recent changes in Gutenberg (WordPress/gutenberg#75387) are incompatible with our old custom package. We support WordPress 6.8+, so we can remove the custom package and use the package directly from core.

Code review notes

Verify that RichText in email editor works as expected and that you can insert Personalization tags

QA notes

N/A

Linked PRs

N/A

Linked tickets

WOOPRD-2309

After-merge notes

N/A

Tasks

  • I have added a changelog entry (./do changelog:add --type=<type> --description=<description>)
  • I followed best practices for translations
  • I added sufficient test coverage
  • I embraced TypeScript by either creating new files in TypeScript or converting existing JavaScript files when making changes

Preview

Preview in WordPress Playground

The latest successful build from remove-custom-richtext will be used. If none is available, the link won't work.

No issues found.

The PR removes custom RichText package deregistration and asset enqueuing from EditorPageRenderer.php, allowing WordPress core's RichText package to be used instead. This is a straightforward code removal with no new functionality introduced. The change:

  • Eliminates the deprecated custom RichText handling that would break with future Gutenberg releases
  • Maintains all other email editor integration logic intact
  • Relies on WordPress core RichText (available in WordPress 6.8+, which is the minimum supported version)
  • Does not introduce new dependencies, error handling, or code paths that could introduce bugs

The remaining RichText usage in other components (form-editor, marketing-optin-block) are unaffected by this change since they import from @wordpress/block-editor or @wordpress/rich-text, not from the custom package being removed.

The version we use will break with the future Gutenberg release.
@coderabbitai

coderabbitai Bot commented Feb 13, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Removed a code block that deregistered the WordPress rich-text script and enqueued a replacement rich-text.js with asset dependencies and version. The email editor integration continues with the remaining enqueue logic intact.

Changes

Cohort / File(s) Summary
Rich Text Script Removal
mailpoet/lib/EmailEditor/Integrations/MailPoet/EditorPageRenderer.php
Deleted block deregistering WordPress rich-text script and enqueuing replacement asset with dependencies (11 lines removed).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • lysyjan
  • Aschepikov
🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (1 file):

⚔️ mailpoet/lib/EmailEditor/Integrations/MailPoet/EditorPageRenderer.php (content)

These conflicts must be resolved before merging into trunk.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly summarizes the main change: removing the custom rich text implementation from the email editor.
Description check ✅ Passed The description includes all key sections: context for the change (incompatibility with Gutenberg), rationale (WordPress 6.8+ support), code review and QA notes, and linked ticket. Tasks checklist is present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-custom-richtext
⚔️ Resolve merge conflicts (beta)
  • Auto-commit resolved conflicts to branch remove-custom-richtext
  • Create stacked PR with resolved conflicts
  • Post resolved changes as copyable diffs in a comment

No actionable comments were generated in the recent review. 🎉


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.

@triple0t triple0t left a comment

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.

LGTM

@triple0t
triple0t merged commit 8ba3948 into trunk Feb 23, 2026
23 checks passed
@triple0t
triple0t deleted the remove-custom-richtext branch February 23, 2026 15:58
@triple0t triple0t assigned costasovo and unassigned triple0t Feb 23, 2026
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