Skip to Content
avatar image
Former Member

Personas Script editor

We are using SP05 personas here, But when scripting in personas, we have to write script in one line. Like below:

If we broke above lines in multiple lines – Like below. All the lines will error out.

It is too tedious to write code in one line in personas script editor. Is there any solution out there for this matter?

gji4h.png (4.0 kB)
eozpm.png (5.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 22 at 07:35 PM

    Hi Nixal.

    What I have done in the past is build the string over multiple lines using the "+=" to append each line to the string. It worked well for me.

    Kind Regards,

    Cristin

    var chartHTML = "<html><head>";
    chartHTML += "<script type=\"text/javascript\" src=\"https://www.gstatic.com/charts/loader.js\"></script>";
    chartHTML += "<script type=\"text/javascript\">"; 
    (and so on...)
    Add comment
    10|10000 characters needed characters exceeded

  • Jul 25 at 07:17 AM

    You can also do something like this.

    var tableHTML = "<html> <some code>"+

    "<some other code>"+

    "</html>";

    Add comment
    10|10000 characters needed characters exceeded