Hi all,

I want to change the colour of a string in some styled text.
As the string may be any string like "font", "size", etc. that appear in html tags,
I use the following code that works but I'm not satisfied with it...
Any more elegant solution?
Thanks.

  put the htmlText of fld "Result" into tText
  -----
  replace "<font" with numToChar(3) in tText
  replace "face=" with numToChar(8) in tText
  replace "size=" with numToChar(9) in tText
  replace "color=" with numToChar(27) in tText
  replace "</font>" with numToChar(244) in tText
  -----
  replace pFind with numToChar(3) && numToChar(27) & quote \
     & the uPatternColor of this stack & quote & ">" & pFind \
     & "</font>" in tText
  -----
  replace numToChar(3) with "<font" in tText
  replace numToChar(8) with "face=" in tText
  replace numToChar(9) with "size=" in tText
  replace numToChar(27) with "color=" in tText
  replace numToChar(244) with "</font>" in tText
  -----
  set the htmlText of fld "Result" to tText

Best Regards from Paris,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        [EMAIL PROTECTED]/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to