Unfortunatelly I can't find a simple solution for the same problem if there is new line () in the text. innerHTML does not work, as it parses the new line as a simple text.