Kind of a dumb question but i can’t figure out how to create a new line in sp-body text element.
The usual new line character \n doesn’t seem to work. Splitting the text using the \n character and just creating sp-body elements works, but the formatting looks more like a new paragraphs than a line break.
try wrapping your text in paragraph elements.
<p>text here</p>
<p>line 2</p>
you can also try using manual line break <br/>
Thanks,
my issue was actually setting the element textContent property instead of the innerHTML.
<br>
with innerHTML property works fine.