On 4/7/2019 9:00 PM, Paul Dupuis via use-livecode wrote:
I take it your have tried:

put the rtfText of field "X" into URL ("file:"&specialFolderPath("desktop")&slash&"savedfield.rtf")

And then reading it back to a new field with:

set the rtfText of field "Y" to URL ("file:"&specialFolderPath("desktop")&slash&"savedfield.rtf")

and the tab spacing is not preserved?


If the rtfText does nto preserve the tabstops, the htmlText should preserve the tabstops. See the dictionary entry for the htmlText property of a field.

If neither the rtfText property of a field, nor the htmlText property of a field preserve the tabstops (again, not sure about rtfText, but the Dictionary implies htmlText does), you can use

put the arralEncode(the styledText of field "X") into URL ("binfile:"&specialFolderPath("desktop")&slash&"savedfield.bin")

And then reading it back to a new field with:

put URL ("binfile:"&specialFolderPath("desktop")&slash&"savedfield.bin")into tFieldData
set the styledText of field "Y" to arrayDecode(tFieldData)

But this later approach does not produce an RTF or HTML file that can be opened in other software tools like Microsoft Word

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to