Text and html text
Thomas McGrath III
mcgrath3 at mac.com
Wed Jul 17 09:16:35 EDT 2013
Maybe too many steps were involved. If you pasted: <p>Bold<p>Regular<p> into the field and see the markers then: set the htmlText of fld "MyField" to the text of fld "MyField" should work.
-- Tom McGrath III
http://lazyriver.on-rev.com
mcgrath3 at mac.com
On Jul 17, 2013, at 8:46 AM, Graham Samuel <livfoss at mac.com> wrote:
> 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
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list