rtf to html

Jan Schenkel janschenkel at yahoo.com
Mon Dec 16 09:20:01 EST 2002

--- Ron <rbarber at yhb.att.ne.jp> wrote:
> Greetings
> I thought I would ask before we all get busy working
> with 2.0. Has someone
> already made an rtf to html converter for RR? I have
> some files that must be
> shipped with the product as rtf (otherwise I would
> convert them all
> beforehand and be done with it) and therefore
> converted when they are read
> and displayed. 
> Thanks
> Ron

Hi Ron,

Funny that you should mention RunRev 2.0 in this post,
as that version will sport a new 'RTFText' property
for its fields.
And then it will be a piece of cake:

on mouseUp
  answer file "Select RTF file to convert"
  if the result is "Cancel" then exit mouseUp
  put it into tFile
  set the RTFText of fld "Converter" to URL \
    ("file:" & tFile)
  ask file "Save as HTML file"
  if the result is "Cancel" then exit mouseUp
  put it into tFile
  put "<HTML>" & return & "<BODY>" & return & \
    (the HTMLText of fld "Converter") & \
    return & "</BODY>" & return & "</HTML>" \
    into URL ("file:" & tFile)
end mouseUp

Admittedly that's not an answer you can use right
away, but if you can wait, this will come in handy.

Best regards,

Jan Schenkel.

"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

More information about the Use-livecode mailing list