The styledText array is different from the array-flavored syntax for toggling style runs.kaveh1000 wrote: ↑Sat Feb 08, 2020 10:47 pmI was just about to post that I was thinking of styledText when I referred to the arrays. I think, Hermann, that you commented a long time ago on a problem I had, after Trevor suggested styledText.
I don't quite understand what would be best for me, from your comments. In my case I want to have a range of styles available, as well as backgroundcolor, box around paras, etc.
For the task presented here, toggling styles runs, the syntax I gave is Mark Waddingham's suggestion for such things. Indeed, he added it specifically for that purpose, to get past the old HC way in which there was no simple way to preserve other styles while removing one.
The styledText array is worth knowing about for other things. In fact, all of the new field features added in v5.5 (paragraph-level formatting, outline lists, etc.) are so wonderful it's worth taking an afternoon to review them for when you need them later. I'm sure the docs have been moved to a more permanent home, but I've grown accustomed to finding them in the Release Notes for that version, and it remains perhaps the best one-stop-shopping for those revisions - starting on p12:
https://downloads.livecode.com/livecode ... -5_5_4.pdf