I'm finding that when I do a find and replace, that all of the text styles (e.g. bold, italic, etc) are removed from the field when the target word is replaced. I'm using LC 6.6.2 on Windows 764 bit. Is this a bug, or is there a way to turn this behavior off?
Thanks,
Sefro
Find/Replace removes text style
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 447
- Joined: Mon Jan 23, 2012 12:46 pm
Re: Find/Replace removes text style
Sefro,
There is a note about this behaviour in the dictionary, so it's not seen as a bug.
Here's the note…
Paul
There is a note about this behaviour in the dictionary, so it's not seen as a bug.
Here's the note…
HTHImportant! You can use the replace command on a field, but doing so removes any formatting (fonts, styles, colors, and sizes) in the field. To work around this limitation, use the field's htmlText property as the source for replacement instead of using the field itself as the source:
get the htmlText of field "Stuff"
replace "old" with "new" in it
set the htmlText of field "Stuff" to it
Paul
-
- Livecode Opensource Backer
- Posts: 447
- Joined: Mon Jan 23, 2012 12:46 pm
Re: Find/Replace removes text style
I can't believe I didn't look in the dictionary, since I was using the built in Find and replace I had hoped this wasn't the case. Thanks for the info.