Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lexical][lexical-devtools-core][lexical-playground] Bug Fix: fix TextNode importDom highlight formatting #6518

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bfritscher
Copy link

@bfritscher bfritscher commented Aug 13, 2024

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

image

Pull request facebook#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.

- 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
Copy link

vercel bot commented Aug 13, 2024

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 13, 2024
Copy link

github-actions bot commented Aug 13, 2024

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%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: highlight TextFormatType is missing in importDOM losing state
3 participants