Hi Slava,
I added two textfields (Textfield1 and Textfield2). Set them to Rich Text on the Field Tab and XHtml format on the Binding Tab.
On the click event of TextField2 using Javascript Run at Client. I broke down the phrase you used for both cities into 6 variables. Added the bold() attribute to the Variable for "beautiful".
----- form1.#subform[0].TextField2::click: - (JavaScript, client)
var NY1="It's a";
var NY2="beautiful";
NY2=NY2.bold();
var NY3="World!";
var CA1="It's a";
var CA2="beautiful"
CA2=CA2.italics();
var CA3="World!";
TextField1.rawValue=(NY1+" "+NY2+" "+NY3);
TextField2.rawValue=(CA1+" "+CA2+" "+CA3);
I saved the file as dynamic ver 7 and previewed the form.
I clicked in textfield2 and it populated textfield1 with the string It's a
beautiful World!
It adds the
and but Adobe doesn't interpret it as bolding the text.
I clicked in textfield1 and it populated textfield1 with the string It's a
beautiful World!
It adds the
and but Adobe doesn't interpret it as bolding the text. Even though both textfields are set to rich text.
In viewing the XML I see where it shows the Field format
In the xfa_spec_2_5.pdf it has a section on Page 188 Representing and Processing RichText. I linked to page 1035 for an example of Bolding text. I defined a variable Pam_A and pasted their example into the script editor.
The second and
fourth
words are bold.
I added a new field and added this script to the click event of TextField2. TextField3.rawValue=(Pam_A);
The TextField3 displays "Empty" on Preview of form.
Perhaps an Adobe support member can shed more light on what the exact code we need to use.
Have a great day.
Pam