Page 1 of 1

How to View Raw HTML Tagged Text as HTML

Posted: Thu Apr 03, 2014 4:48 pm
by deeverd
Hello RunRev Internet Forum,

I've been unsuccessfully experimenting with trying to do the following:

First, create a plain text field out of a field that originally contained styled text so I can view the HTML tags in it. This I can do with no problem.

Second, edit the raw HTML tags by hand and then attempt to re-view that page as styled HTML. Part two here is where I'm having problems.

I'm familiar with the concepts of "get" and "set" when it comes to working with the HTMLText but whenever I do, I just see another plain copy of raw HTML tags in plain text.

How do I view these changes as styled HTML again? Is this a browser function? A clipboardData function? So far, any solution has eluded me.

If anyone has a working solution to this problem, it would be greatly appreciated.

All the best,
deeverd

Re: How to View Raw HTML Tagged Text as HTML

Posted: Thu Apr 03, 2014 6:17 pm
by Klaus
HI deeverd,

I think you are looking for something like this:
...
set the htmltext of fld "really styled htmltext display" to the text of fld "the field with the raw html tag stuff"
...
You get the picture :D


Best

Klaus

Re: How to View Raw HTML Tagged Text as HTML

Posted: Thu Apr 03, 2014 6:17 pm
by bn
Hi deeverd,
First, create a plain text field out of a field that originally contained styled text so I can view the HTML tags in it. This I can do with no problem.
assuming that you have two fields
The first is the one you have pasted html-formatted text to and it now appears formatted as the html would demand.
Then you have transfered the htmltext of field 1 to field 2 by

Code: Select all

put the htmlText of field 1 into field 2
now you edit the html in field 2 and then, here is the magic

Code: Select all

set the htmlText of field 1 to the text of field 2
now your changes to the formatting should appear in field 1.

Kind regards
Bernd

Re: How to View Raw HTML Tagged Text as HTML

Posted: Thu Apr 03, 2014 7:32 pm
by deeverd
Hello Klaus and bn,

It works like a charm. Thank you so much! It's such a simple solution that I'm almost embarrassed that I needed to ask (right now I'm happy enough to have a solution that it's Ok to be embarrassed). What fooled me was setting field 1 to the "text" of the plain field with the html tags. I assumed that because the plain field contained html information (howbeit as tags), I would have to set it to the htmlText of the plain field. No wonder it didn't work originally.

Thanks again for enlightening me.
All the best,
deeverd

Re: How to View Raw HTML Tagged Text as HTML

Posted: Sun Feb 08, 2015 6:21 am
by andy60
bn wrote:Hi deeverd,
First, create a plain text field out of a field that originally contained styled text so I can view the HTML tags in it. This I can do with no problem.
assuming that you have two fields
The first is the one you have pasted html-formatted text to and it now appears formatted as the html would demand.
Then you have transfered the htmltext of field 1 to field 2 by

Code: Select all

put the htmlText of field 1 into field 2
now you edit the html in field 2 and then, here is the magic

Code: Select all

set the htmlText of field 1 to the text of field 2
now your changes to the formatting should appear in field 1.

Kind regards
Bernd
hi tell me about the following code, i have no data in txt file:

Code: Select all

on mouseUp 
   local myGoo
   put "<title>pippo</title>" into myGoo
   open file specialFolderPath("desktop") & "/myGooData.txt" for write 
   write myGoo to file specialFolderPath("desktop") & "/myGooData.txt" 
   close file specialFolderPath("desktop") & "/myGooData.txt" 
end mouseUp

Re: How to View Raw HTML Tagged Text as HTML

Posted: Sun Feb 08, 2015 12:47 pm
by Klaus
Hi Andy,

please do not try to revive a dead and solved thread, create a new one! 8)

And use BRACKETS ALWAYS when creating/concatenating pathnames and objectnames:
-> open file (specialFolderPath("desktop") & "/myGooData.txt") for write

Maybe you like to save some typing and use the URL syntax:

Code: Select all

on mouseUp 
   put "<title>pippo</title>" into url("file:" & specialFolderPath("desktop") & "/myGooData.txt")
   ## Done :-)
end mouseUp

Best

Klaus