Re: Text and html text

2013-07-17 Thread Thomas McGrath III
Maybe too many steps were involved. If you pasted: pBoldpRegularp 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
mcgra...@mac.com

On Jul 17, 2013, at 8:46 AM, Graham Samuel livf...@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@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

___
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


Re: Text and html text

2013-07-17 Thread Richmond

On 07/17/2013 03:46 PM, Graham Samuel 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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


How about exporting the field contents as HTML. mucking around with the 
resulting html document with either a text editor or a dedicated html 
editor, and then importing the html document back into the field?


Richmond.


___
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