Converting back from HTMLtext...

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
paulsr
Posts: 222
Joined: Thu Jul 19, 2012 9:47 am
Contact:

Converting back from HTMLtext...

Post by paulsr » Fri Sep 14, 2012 1:05 pm

Folks, I'm hoping this is a simple question...

If I have a field which contains html text (coded using "put the HTMLtext of ... into ...)

How do I get this text back into a readable format, i.e. minus the html tags?

I've seen code which contains "set the HTMLtext of ... to ..." but I can't make that work.

TIA for any help,

--paul

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Converting back from HTMLtext...

Post by Klaus » Fri Sep 14, 2012 1:15 pm

Hi Paul,

if you dont want the HTMLtext, then leave the HTML stuff, also in the syntax :D
...
put the HTMLtext of fld "the one with html in it" into tHTMLText
put the TEXT of fld "the one with html in it" into tPlainText
...

Best

Klaus

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Converting back from HTMLtext...

Post by mwieder » Fri Sep 14, 2012 5:13 pm

Klaus- If I understand the OP correctly here (NB: I haven't had enough caffeine yet, so this may not be correct) the htmltext in the field is the result of doing something like "put the htmltext of..." into a field.
In that case, getting back to a text format would be a matter of

(assuming that the htmltext is in field 1)

Code: Select all

set the htmltext of field 2 to field 1

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Converting back from HTMLtext...

Post by Klaus » Fri Sep 14, 2012 5:25 pm

Hm, yes, I may have misunderstood the problem :D

paulsr
Posts: 222
Joined: Thu Jul 19, 2012 9:47 am
Contact:

Re: Converting back from HTMLtext...

Post by paulsr » Sat Sep 15, 2012 3:14 am

Okay, thanks guys.

In...

Code: Select all

set the htmltext of field 2 to field 1
... I had fields 2 & 1 the wrong way round.

All fixed now!

--paul

Post Reply