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

HTML String into rsx! #2400

Closed
jing-951 opened this issue May 8, 2024 · 1 comment
Closed

HTML String into rsx! #2400

jing-951 opened this issue May 8, 2024 · 1 comment

Comments

@jing-951
Copy link

jing-951 commented May 8, 2024

How to map HTML strings to RSX!
I searched for everything about Dioxus but couldn't find it.
For example, converting
"<p>abc</p><h1>123</h1>"
into:

Rsx! {
P {"abc"},
H1 {"123"},
}
@wheregmis
Copy link

wheregmis commented May 8, 2024

You can use something like this

let contents = "live <b>dangerously</b>"; rsx! { div { dangerous_inner_html: "{contents}" } }

For more detail Check https://dioxuslabs.com/learn/0.5/reference/rsx

@ealmloff ealmloff closed this as not planned Won't fix, can't repro, duplicate, stale May 9, 2024
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