marko-js / marko

A declarative, HTML-based language that makes building web apps fun

Home Page:https://markojs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

similar tag like dangerouslySetInnerHTML

xd-dw opened this issue · comments

commented

is there in Marko a similar tag like dangerouslySetInnerHTML in react so that i can dynamically render html text as html?
eg.
<div dangerouslySetInnerHTML={{ __html: rawHTMLAsText }}></div>
where rawHTMLAsText=<em>Process</em> is <em>not</em> <em>defined</em>

You use $!{EXPRESSION} to interpolate in unescaped text content (you don't need a tag for this).

See https://markojs.com/docs/syntax/#dynamic-text