I want to add a space to a rtf field. That space should have the font: Tahoma 11pt regular. So any character typed futher in that field has the font Tahoma regular 11.
The code should look something like this:
var a = ??? //<---- rtf string space Tahoma regular 11
forms[_form].rtffield += a;
Can anayone give me the code or a solution to my problem?
The rtf code for adding a space in the right font is:
{\rtf1\ansi{\fonttbl\f0\fnil Monospaced;\f1\fnil Tahoma;}\f1\fs22\i0\b0 }
But the following code doesn’t work:
forms[_form].rtffield += ‘{\rtf1\ansi{\fonttbl\f0\fnil Monospaced;\f1\fnil Tahoma;}\f1\fs22\i0\b0 }’;
The code doesn’t give the space I want. When I display that same field as a normal textarea next to the rtf field, and I add the code manually in the normally displayed field, then the space is added.
Solved the problem myself:
forms[_form].rtffield += ‘{\rtf1\ansi{\fonttbl\f0\fnil Monospaced;\f1\fnil Tahoma;}\f1\fs22\i0\b0 }’;