Hi there,
I was trying to figure out how to toggle a class on all matching items within a text selection and couldn't see a way to do it, since the toggleClass API appears to use parentOrSelf to look for matches in the chain of elements from the cursor upwards. Did I get this right?
If that's the case, then perhaps it would be useful to alter the toggleClass interface to enable toggling a class on matches within a selection, e.g. searching for matches downwards in the editor DOM tree, rather than upwards?
Cheers,
Stefan