Text and html text
Graham Samuel
livfoss at mac.com
Wed Jul 17 08:46:47 EDT 2013
I was asked to do some editing of a field with a lot of text in it in someone else's program. The field consists of lines, some of which are in the default color (black) and some in red. I couldn't find a reliable way of doing find and replace on the field in situ, so I copied the whole contents and pasted it into a simple text editor (TextEdit on the Mac). All the text came across, but when I'd edited it and pasted it back, it didn't look the same (for example, the line spacing looked wrong). I then looked at all the properties of the original field (prior to my edit), where the text was revealed to be the htmlText of the field, with included paragraph (<p>) and color markers etc. I copied that into TextEdit, edited it and tried to paste it back - but I could see all the markers. I realised that I had somehow replaced htmlText with plain text in the field. I then tried to correct this by executing the following in the message box:
set the htmlText of fld "MyField" to the text of fld "MyField"
Nothing happened.
How can I get back to the original situation after editing the text?
TIA
Graham
More information about the use-livecode
mailing list