Open jswiderski opened 5 years ago
There is selectioncheck
, however it is fired before selectionChange
and due to the fact how we use selectionChange
in the editor, it's pretty useless at its current form.
selectionChange
behaviour was introduced to increase performance, however it is really limiting for certain use-cases 😞
Type of report
Feature request
Provide description of the new feature
We have got an interesting question from one of editor users:
The natural thing is to use selectionChange event and disable all other commands/buttons when tag like
strong
gets detected.An example of such implementation can be found here: example.zip. The problem with
selectionChange
event is that it doesn't get fired when start element doesn't change what makes this event useless for such selection-aware use case (please see attached screen-cast - not-working.zip).Perhaps a different event could be introduced or the selectionChange event could be modified to check also the end element, perhaps start/end offsets/containers of a range, whether selection was perilously collapsed and now is non-collapsed etc.