You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simon Tharby edited this page Sep 28, 2020
·
3 revisions
Multiple paragraphs can be specified. "<br />" = blank line.
Each paragraph will be allocated an id, enabling update or styling of text for specific paragraph(s). centered will default to false, if not included in args, in which case text will be left-aligned.
Format:
addText(name,parent,[para1, ...],centered)
Example usage (see uiLayout.js for more examples):
letparent=document.getElementById("ui-container");uiElements.addText("example_text_box",parent,["This is a text box.","<br />","It will grow to fit the text provided."]);
Example of generated HTML:
<divid="example_text_box" class="text-box"><pid="example_text_box_0">This is a text box.</p><pid="example_text_box_1"><br></p><pid="example_text_box_2">It will grow to fit the text provided.</p></div>