How to convert string to HTML element in Mithril?
3 answers
Try to create a container in which you want to save your own span.
1. Use jQuery to select it.
2. In this selection, call the jQuery method .html()and pass the HTML to your string.
( $('.container').html(//string-goes-here)for example)
You should be able to set the internal HTML container as a string, so you want to use an HTML element.
Docs are here .
-3