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

Bug: highlight TextFormatType is missing in importDOM losing state #6498

Open
bfritscher opened this issue Aug 6, 2024 · 1 comment · May be fixed by #6518
Open

Bug: highlight TextFormatType is missing in importDOM losing state #6498

bfritscher opened this issue Aug 6, 2024 · 1 comment · May be fixed by #6518

Comments

@bfritscher
Copy link

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 tag in

static importDOM(): DOMConversionMap | null {

Also the devtools do not show formatting for this new highlight feature because its mising in

Lexical version: 0.16.1

Steps To Reproduce

  1. exportDOM a TextNode with format highlighting
  2. importDOM mark does not get parsed back to highligted text.,
@etrepum
Copy link
Collaborator

etrepum commented Aug 12, 2024

This would be a straightforward PR to write if you were interested, or you could override the importDOM using the html property of your EditorConfig if you needed a solution that would work without upgrading lexical. It doesn't look like any code in the monorepo is using IS_HIGHLIGHT which is likely why it was forgotten here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants