Open Miloage opened 3 months ago
explain. If you want to listen to selection-change
. You need to use editor-change
event
I don't necessarily need to listen to selection-change
event, but when I input the first character, I get an incorrect range index.
getSelection()
function sometimes cannot get the correct cursor position index, such as when entering the first character at the beginning of each line or when the cursor is focused immediately after the Blot element.
After the input of the first character in each line, the range index did not change, failing to trigger the “selection-change” event. If the first content is Embed blot, there is also such a problem.
As shown in Figure 2, after a line break input, there is only a “text-change” event and no “selection-change” event.