-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Add HTML data option [enhancement] #112
Comments
@sanderjson I think would be better to support Custom Svelte Components no? We can render with |
Yes, this is great. Breaking change for 4.0? |
Both html and svelte elements/components would make this infinitely more useful and awesome. I second this idea :-) |
If you're happy to use a hack until maintainers add it, you can modify {#if node.image && !node.data.label}
<ImageNode {node} {key} />
+ {:else if node.data.html}
+ <Node {node} {key}>{@html node.data.html}</Node>
{:else}
<Node {node} {key}>{node.data.label}</Node> Then use a const nodes = [
{
id: 1,
width: 100,
height: 100,
position: { x: 0, y: 250 },
data: { html: `<p>This is <a href="https://html.com">HTML</a></p>` },
},
]; |
This is great! I was previously using this code below. Great addition thank you 😀🎉
|
I would love to be able to render my own HTML within custom nodes.
The text was updated successfully, but these errors were encountered: