HTMLText question

Kay C Lan lan.kc.macmail at
Tue Dec 15 22:51:06 EST 2009


one further observation. If the field already contains formatted text, ie
bold or coloured, doing what you are doing would set everything back to
plain text except for word 2 so in most cases (but I accept not all) you'd
want to do deal with htmlText exclusively:

put the htmlText of fld "myField" into tHtml --not the plain text
replace "<b>" with "<box><b>" in line 2 of  tHtml
replace "</b>" with "</b></box>" in line 2 of tHtml
set the htmlText of fld "myField to tHtml

Of course one case where you would one to swap from one to the other is if
you want to strip HTML tags. Set the htmlText of a field to a html file,
then put the field into a Var, most of the html is then nicely stripped for
you :-)


On Wed, Dec 16, 2009 at 4:47 AM, Devin Asay <devin_asay at> wrote:

> Two problems: only fields have the htmlText property (as Jerry mentioned),
> and you're mixing literals and an expression. Try:
> get fld "myField"
> put "<box>" & word 2 of it & "<box>" into word 2 of it
> set the htmlText of fld "myField" to it
> Devin
> Devin Asay
> Humanities Technology and Research Support Center
> Brigham Young University
> _______________________________________________
> use-revolution mailing list
> use-revolution at
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:

More information about the Use-livecode mailing list