[lexical][lexical-devtools-core][lexical-playground] Bug Fix: fix TextNode importDom highlight formatting
Description
Pull request #3583 by @moy2010 added a new textformat (which is helpful), but if we use HTML to serialize it gets lost because importDOM is not parsing the mark or if we past HTML with <mark>, but the editor is already capable to export <mark> and set IS_HIGHLIGHT.
- Added the missing mark entry
- Added a highlight formatting menu entry to playground for manual testing (including icon, and CSS theme)
- added the missing entry in devtools to show format: highlight
- added a test to check for mark on html past
Closes #6498
Test plan
After
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| lexical | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 27, 2024 5:26am |
| lexical-playground | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 27, 2024 5:26am |
size-limit report 📦
| Path | Size |
|---|---|
| lexical - cjs | 29.38 KB (0%) |
| lexical - esm | 29.22 KB (0%) |
| @lexical/rich-text - cjs | 37.87 KB (0%) |
| @lexical/rich-text - esm | 31.08 KB (0%) |
| @lexical/plain-text - cjs | 36.45 KB (0%) |
| @lexical/plain-text - esm | 28.44 KB (0%) |
| @lexical/react - cjs | 39.61 KB (0%) |
| @lexical/react - esm | 32.5 KB (0%) |
I think this looks good but the conflicts need to be resolved before this can be merged
@etrepum I've created a new PR #7186 that resolves these merge conflicts. The new PR:
- Maintains all the original functionality from this PR
- Integrates with the current main branch's centralized toolbar state management
- Preserves the highlight feature while resolving all conflicts
Feel free to review the changes in the new PR. Once approved, we can close this PR in favor of #7186.