-
Notifications
You must be signed in to change notification settings - Fork 35
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
Inserting unescaped HTML string. #106
Comments
I know probably parsing html into VDOM objects would probably be the best here. |
@aarondewindt, |
We don't want to inject raw HTML onto the DOM with
That's what we built it for! |
@rgbkrk perhaps worth porting the |
Where... did that get written at? It's... been awhile. |
Here's the function: https://idom-docs.herokuapp.com/docs/_modules/idom/utils.html#html_to_vdom I wrote it for IDOM but it should be compatible. |
I'm using a third-party library (tabulate) to generate html tables from my data and I would like to insert these in the dom. Since I wasn't able to find a way to do this scanning through the docs and code I came up with this work around.
Running this doesn't result in what expect.
Renders the raw html source in the browser instead of the bold texts. So it's still being escaped.
Calling
component.to_html()
gives me the expected html code<div><b>HTML Source</b></div>
. Which means that rendering the component in a IPython.display.HTML` gives me the expected result.I've obviously missed something in my
RawHTML
class implementation. So does anyone know what I missed? Is there an official way to insert raw html? And if not are there plans to to add this as a feature?The text was updated successfully, but these errors were encountered: