Skip to content

Implement render function in React preset #101

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
JiLiZART opened this issue May 25, 2021 · 1 comment
Open

Implement render function in React preset #101

JiLiZART opened this issue May 25, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request P2 Normal issue

Comments

@JiLiZART
Copy link
Owner

Add ability to pass render and render bbcodes to react in react preset

@Ethorsen
Copy link

Ethorsen commented Jan 14, 2022

Would it gives the ability to render some of the tags with our own homemade react components?

Because it would be exactly what I'm looking for.

EDIT: Nevermind...

It seems I can already do that by providing my custom component to the tag key

reactPreset.extend((tags, options) => ({
  ...tags,
  mytag: (node) => ({
    tag:   MyTagHandler,
    attrs: {
      tagContent: node.content[0],
    },
  }),
}));

@JiLiZART JiLiZART added the enhancement New feature or request label May 9, 2022
@JiLiZART JiLiZART added the P2 Normal issue label Sep 28, 2023
@JiLiZART JiLiZART self-assigned this Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2 Normal issue
Projects
None yet
Development

No branches or pull requests

2 participants