Closed ndvalkov closed 8 years ago
I'm not sure that's possible in the underlying format.js library we're using, since the behaviour is just marshalling attributes to them. Does your example work there?
No idea. I need it for just a couple of text blocks and it's an informal project, so I'll just split into separate resources for the paragraphs. Thanks.
@ndvalkov You need use innerHTML
of element.
@JosefJezek , how can I use innerHTML if I need to localize into :
@gaxolio Please post better example of issue...
@JosefJezek, here a better example:
this is from "locales.json" , "en" section
"tooltipXyz": "<br />Bytes added/removed from ingress to egress. <br />Ingress UNI Pop: -4. <br />Egress MPLS (Remote) with 1 label: +4",
this code inside the tag
this code instead, show the string with the BR tag included.
"
Bytes added/removed from ingress to egress.
Ingress UNI Pop: -4.
Egress MPLS (Remote) with 1 label: +4","
`
I hope I was clear.
Sergio
<paper-tooltip for="ingressEgressProcessing"><s-html html="[[localize('tooltipXyz')]]"></s-html></paper-tooltip>
https://github.com/StartPolymer/s-html
bower i StartPolymer/s-html -S
@JosefJezek . Many thanks for your help. It works!.
Excellent @JosefJezek. Another thanks.
Closing this, as this seems to be resolved? Let me know if I misunderstood and I'll reopen it
How do you process a longer
JSON
string with new lines in it?<br/>
gets escapes,\n
or\\n\\n
do nothing or break, tried<pre>
to wrap the localize placeholder, didn't work either. Only way I see is to split the resource into smaller ones, which is not quite OK.