Page 1 of 1

Converting back from HTMLtext...

Posted: Fri Sep 14, 2012 1:05 pm
by paulsr
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

Re: Converting back from HTMLtext...

Posted: Fri Sep 14, 2012 1:15 pm
by Klaus
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

Re: Converting back from HTMLtext...

Posted: Fri Sep 14, 2012 5:13 pm
by mwieder
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

Re: Converting back from HTMLtext...

Posted: Fri Sep 14, 2012 5:25 pm
by Klaus
Hm, yes, I may have misunderstood the problem :D

Re: Converting back from HTMLtext...

Posted: Sat Sep 15, 2012 3:14 am
by paulsr
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