Skip to content

feat: added heading jsx provider #3

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AdrianMaj
Copy link

Hey, I added JSX provider for H1-H6 headings. I use it in my project, and didn't see a ready version, so here it is.

@rubn-g
Copy link
Owner

rubn-g commented Jan 2, 2025

Thanks for your contribution! Lexical creates a text node type inside heading node for colored text, so this converter shouldn't be required, that's also how bold, italic, and other formatting options, works. So text JSX converter should cover this use case too.

I tested changing colors of a heading and lexical created the text node inside the heading node, as expected. Did you find any case where lexical didn't create a text node for color styling?

@AdrianMaj
Copy link
Author

@rubn-g Yeah, I got unknown-node text instead of heading without that. One thing to mention is that I use only selected content from repo, as whole package triggers me an Couldn't resolve 'fs' error

@rubn-g
Copy link
Owner

rubn-g commented Jan 2, 2025

We should fix the Couldn't resolve 'fs' error then and this Heading JSX converter, won't be required to achieve what we want.
I'll try to fix that error

@AdrianMaj
Copy link
Author

It's some problem with npm package, as source code works well

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