I know that it is possible to create line breaks when I fill the text of a text box through JS by inserting ‘\n’. Is there also a way to create a new paragraph when I fill the text of a shape through JS, i.e. something similar to
prez.object('Box').text("abc \p def")
Thanks,
Rolf
Please choose an appropriate sub-category to post your question or topic.
I was hoping that if I use this, the output would also have the spacing after paragraphs that I specified in the box for the paragraphs. The html function does seems to ignore these values.
best, Rolf
Please let us know how the spacing is set up.
If the settings are in the editor, when calling the html() function, it will replace all the old text so it will no longer be effective.
Yes, you can add the style to the html.
For example, use the margin-bottom style for the first paragraph: html('<p style="margin-bottom:20px;">abc</p><p>def</p>');
If you want the spacing to be far or near, edit the value of “20px”.