How do I insert text - that I know to be 'safe' - directly into an Elm page.
i.e. what is text'
in the following.
let str = "<h1>Hello World</h1>"
in div [] [ text' str ]
In practise I could get any valid HTML, so I don't want to build a parser, and I'd rather avoid a port as playing around wit the DOM can break the virtual dom diffing
There are a few solutions discussed in this post. Seems the poster had success with using Markdown.toHtml
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With