There's some way to create a element on Leptos with document().create_element() and add it at the view? #1551
Answered
by
gbj
leorsousa05
asked this question in
Q&A
-
I wanted to create a element on Leptos and add it into the view! I wanted to do it because the leptos don't have a html to RSX parser, so it's impossible to get some text from a API and just transform it to HTML. Have some other way to do it? Add a string html to leptos view? |
Beta Was this translation helpful? Give feedback.
Answered by
gbj
Aug 15, 2023
Replies: 1 comment
-
Not exactly what you're asking, but by far the best way to get some HTML from an API and insert it into the DOM: let html = "<span>Here's some HTML</span>";
view! { cx, <div inner_html=html/> } |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
leorsousa05
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not exactly what you're asking, but by far the best way to get some HTML from an API and insert it into the DOM: