Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rich text string
#4
I don't know if Mozilla accepts RTF directly but this works to an RTF window:

Function SetRtf
Code:
Copy      Help
_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)


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)