set the textStyle to not bold
Beat Cornaz
b.cornaz at gmx.net
Sat Oct 3 12:31:51 EDT 2009
> Craig wrote :
>The proffered scripts all necessitate that the original text,
likely from a
>field, be manHandled word by word.
>This is because text in a variable does not retain the textStyle of
the
>source. But don't I remember that there is a way, or a gadget, that
holds the
>style along with the raw text? The only reason it might matter is
speed; a
>lot of getting and setting goes on in the solutions offered. It
might be worth
>it to put massive amounts of text in a variable and process there,
>returning the new styled text to the field in one put.
>Seems like I saw this somewhere...
>then Paul wrote :
>This would be a way to follow Craig's suggestion:
> put the htmlText of fld 1 into temp
>replace "<b>" with "" in temp
> replace "</b>" with "" in temp
> set the htmlText of fld 1 to temp
I didn't really think in the HTML direction, because speed in my case
is of absolutely no importance. I guess the little pitfall I pointed
out above also applies to this script. I was originally thinking of
checking and setting the textStyle of each char (like Devin and Paul
did on words level). Then I hoped there would be a cleaner way.
Cheers, Beat
More information about the use-livecode
mailing list