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

React JSX Support #253

Open
Lexpeee opened this issue Apr 25, 2023 · 3 comments
Open

React JSX Support #253

Lexpeee opened this issue Apr 25, 2023 · 3 comments

Comments

@Lexpeee
Copy link

Lexpeee commented Apr 25, 2023

Hello! I'm not entirely sure if this has been raised before or asked, or maybe this question might seem of a basic one, but I just want to ask if there's any support for React JSX elements. So far we are able to pass down HTML elements through content prop, but I was wondering if we can pass down React JSX also. Wanting to parse react components also. Still currently new to the library.

@milesj
Copy link
Owner

milesj commented Apr 25, 2023

@Lexpeee It's been years since I've worked on this, but it should be possible with transform and messing with the configs. Here's the code: https://github.com/milesj/interweave/blob/master/packages/core/src/Parser.ts#L457

@Lexpeee
Copy link
Author

Lexpeee commented Apr 25, 2023

Cool! I'll give it a try

@TechQuery
Copy link

it should be possible with transform and messing with the configs.

@milesj JSX can contain JS code, so @Lexpeee may need https://github.com/TroyAlford/react-jsx-parser .

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

No branches or pull requests

3 participants