How can I strip away formatting from an RTF file?
Devin Asay
devin_asay at byu.edu
Wed Jul 8 13:31:53 EDT 2015
On Jul 8, 2015, at 11:24 AM, Gregory Lypny <gregory.lypny at videotron.ca> wrote:
> Hi everyone,
>
> I imported an RTF file and put it into a field using
>
> set the RTFText of field "File Text" to url ("file:" & longFileName)
>
> Of course, the text in the field is formatted as in the file that was imported. How can I import the text while stripping away the formatting, which I do not need?
>
> Gregory
Gregory,
Just ‘put’ the text of the field into another field or variable:
put fld “myRTF” into fld “myText”
Putting text never preserves formatting.
Another trick I’ve learned (unless it’s been changed recently) is that using ‘replace’ on a field strips formatting.
replace space with space in fld “myRTF”
HTH
Devin
Devin Asay
Office of Digital Humanities
Brigham Young University
More information about the use-livecode
mailing list