How to View Raw HTML Tagged Text as HTML
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 165
- Joined: Mon Jul 16, 2007 11:58 pm
- Location: Las Vegas, NV
How to View Raw HTML Tagged Text as HTML
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
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
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
Best
Klaus
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
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 4027
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: How to View Raw HTML Tagged Text as HTML
Hi deeverd,
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
now you edit the html in field 2 and then, here is the magic
now your changes to the formatting should appear in field 1.
Kind regards
Bernd
assuming that you have two fieldsFirst, 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.
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
Code: Select all
set the htmlText of field 1 to the text of field 2
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 165
- Joined: Mon Jul 16, 2007 11:58 pm
- Location: Las Vegas, NV
Re: How to View Raw HTML Tagged Text as HTML
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
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
hi tell me about the following code, i have no data in txt file:bn wrote:Hi deeverd,
assuming that you have two fieldsFirst, 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.
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 bynow you edit the html in field 2 and then, here is the magicCode: Select all
put the htmlText of field 1 into field 2
now your changes to the formatting should appear in field 1.Code: Select all
set the htmlText of field 1 to the text of field 2
Kind regards
Bernd
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
Andy Bertini
Linux: Mint 17.1 Cinnamon - Gambas 3.6.2 - Gridbox 2.99.174 patched
Mac: OSX Yosemite - Livecode Community 7.0
Blog mzSoftware: http://crmforce.netsons.org/myzone
Email: and.bertini@gmail.com
Linux: Mint 17.1 Cinnamon - Gambas 3.6.2 - Gridbox 2.99.174 patched
Mac: OSX Yosemite - Livecode Community 7.0
Blog mzSoftware: http://crmforce.netsons.org/myzone
Email: and.bertini@gmail.com
Re: How to View Raw HTML Tagged Text as HTML
Hi Andy,
please do not try to revive a dead and solved thread, create a new one!
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:
Best
Klaus
please do not try to revive a dead and solved thread, create a new one!
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