10-30-2013, 03:03 PM
I don't know if Mozilla accepts RTF directly but this works to an RTF window:
Function SetRtf
Function SetRtf
_s=
;{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
;{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\b\f0\fs22 Test \b0 not bold \par
;\ul underlined \ulnone not underlined \par
;\i italicized \i0 not italicized}
;;;some RTF scraped from WordPad editor
_s=
;{\rtf1\Bold Test \b0 not bold \par \ul underlined \ul0 not underlined \par \i italicized \i0 not italicized}
;;;simplified to minimum necessary for insert i.e. will take pre-existing other RTF features e.g. fonttype/fontsize
int w=win("Document - WordPad" "WordPadClass")
int c=id(59648 w) ;;editable text 'Rich Text Window'
act c
_s.setsel("Rich Text Format" c)