Element wrapper of .innerHTML
for data binding with HTML elements.
Localize text with HTML elements using app-localize-behavior.
locales.json
{
"text": "<a href=\"/settings\">Settings</a>"
}
HTML
<s-html html="[[localize('text')]]"></s-html>
Using span
element for content styled with CSS.
locales.json
{
"text": "<a class=\"red\" href=\"/settings\">Settings</a>"
}
CSS
.red {
color: red;
}
HTML
<s-html html="[[localize('text')]]"><span></span></s-html>
Unescape escaped HTML elements.
locales.json
{
"text": "polymer <br>"
}
HTML
<s-html unescape html="[[localize('text')]]"></s-html>
bower i s-html -S
MIT: StartPolymer/license