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

Fix: add class to elements exported from CodeNode #5558

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

2wheeh
Copy link
Contributor

@2wheeh 2wheeh commented Jan 28, 2024

On exporting, CodeHighlightNode and other many ElementNode have same class as on created. However, CodeNode skips to add class to it, so on the page that uses exported HTML, the CSS for theming code should be duplicated for pre. So I'm utilizing htmlConfig as a workaround for now.
before:
image

I'm aware of exportDOM and createDOM of CodeNode return different semantic but still they could have same class.

Copy link

vercel bot commented Jan 28, 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 Jan 28, 2024 7:15am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 28, 2024 7:15am

@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 Jan 28, 2024
Copy link
Member

@zurfyx zurfyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! In the future, we'll need to think of a better way to expand types that doesn't involve mixing the core with ecosystem

@zurfyx zurfyx merged commit b0cc9c4 into facebook:main Jan 29, 2024
41 of 45 checks passed
@2wheeh 2wheeh deleted the add-class-to-code-node-on-exporting branch January 29, 2024 02:36
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants