It looks like you're new here. If you want to get involved, click one of these buttons!
I'm trying to apply styles to specific words within a string. For now I tried creating a paragraph that contains the styles inside (with the idea of appending each word with its style on a string):
var paragraph = "hello <span style=\"color:blue;\">blueeee</span> adios";
txt = createP(paragraph);
For some reason when this is rendered in html, it introduces quotation marks:
Another alternative I though about would be to append word by word (with they specific style), but I'm not sure how to avoid the line break.
Any suggestions? Thanks!