how to write a field on a file keeping the text formatting intact

André.Bisseret Andre.Bisseret at inria.fr
Mon May 7 07:42:15 EDT 2007


Le 7 mai 07 à 13:30, Mark Smith a écrit :

> André, you need to write the htmlText of the field to the file:
>
>
>
> set the defaultFolder to specialFolderPath("desktop") & "/IMPORT"  
> -- with file "thisFile.doc" in "IMPORT
> open file "ThisFile.doc" for write
> write the HTMLText of fld "thisField" to file "suchFile.doc"
> close file "suchFile.doc"
>
> Best,
>
> Mark

Thanks Marc for your immediate answer ;
I tried what you are suggesting but I did not obtain the formatted  
text ; I obtained something like the following :

<p>Un jour sur ses longs pieds</p>
<p>Allait je ne sais où</p>
<p><i>Le héron au long bec</i></p>
<p>Emmanché d'un long cou</p>
<p></p>
<p>	Il côtoyait une rivière</p>
<p>	<u>L'onde était transparente</u></p>
<p>	Ainsi qu'au plus beau jour</p>
<p>	Ma commère la carpe</p>
<p>	Y FAISAIT MILLE TOURS</p>
<p><font color="#FF0000">Avec le brochet son compère</font></p>

What I would like is to obtain the formatted text (not the html  
translation)

Any idea ?

Thanks a lot

Best regards
André



More information about the use-livecode mailing list