On 2018-08-31 19:47, Tore Nilsen via use-livecode wrote:
This information is useful if you want to implement changes to the
styles of the selected text, where textStyles report mixed. In a
selection with mixed styles, setting the textStyle has to be done on a
word by word basis (or char by char basis if different styles are used
within a word).
You can actually manipulate individual textStyles for just this
purposes:
set the textStyle["bold"] of <chunk> to true -- or false
All styled text editors I know of work on the complete selected range
(including whitespace), rather than just on the words...
Warmest Regards,
Mark.
P.S. I'm not saying that 'the wordIndex of <chunk>' might not be useful,
but I do wonder if the above actually solves your problem in an easier /
more consistent with the rest-of-the-world way ;)
--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode