I have a script within an event block that calls an imported javascript function that is within an if statement.
This function does a few things, but among others its meant to fill the text of an object with:
let var = "Test";
let inst = runtime.objects.Object.getFirstInstance();
inst.text = "newline &" + var + "& newline";
The result I would like:
-----
Test
-----
The result I get:
-----
newline &Test& newline
-----
I have also tried Newline, /n and [br][/br], but they just get typed out.
This part is within an imported function called within an if with information that said function calculates. I know newline would work if I set the text via event, but I really wouldn't want to make 5 new global variables that I will only use once, and spread the whole thing over a bunch of other functions just because of this missing syntax. Or copy paste a large function into the scriptblock of the event.
Is there any way to add a text including new lines to a text object with javascript?