Copy link to clipboard
Copied
Here is my code for the first line:
"<b>Client Services</b>+\r"+line1+line2+"Reviewers\r"+line3+line4+line5+line6+line7+
Here is the output:
Client Services<b>Client Services</b>+
How do I get it to add the bold without the <b>Client Services</b>+ after it?
Copy link to clipboard
Copied
What is the context of your script?
Copy link to clipboard
Copied
There are check boxes that the user clicks and a summary of the user's selections on the final page. The line 1, line 2, line 3, and so on are the user's selections. The Client Services and Reviewers are headings to separate the sections.
Client Services
Line 1
Line 2
Reviewers
Line 3
Line 4
Line 5
Line 6
Line 7
Copy link to clipboard
Copied
So it's a multi-line text field?
Copy link to clipboard
Copied
Yes, exactly the code is in a multi line text field.
So it's a multi-line text field?
By @PDF Automation Station
Copy link to clipboard
Copied
event.target.richText=true;
var lines1="Line 1\rLine 2\r\r";
var lines2= "Line 3\rLine 4\rLine 5\rLine 6\rLine 7";
var spans = new Array();
spans[0] = new Object();
spans[0].text="Client Services\r";
spans[0].fontWeight=900;
spans[1] = new Object();
spans[1].text = lines1;
spans[2] = new Object();
spans[2].text="Reviewers\r"
spans[2].fontWeight=900;
spans[3] = new Object();
spans[3].text = lines2;
event.target.richValue=spans;
Copy link to clipboard
Copied
Thank you!