You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From everything I read so far, there is no way to get any information about what exactly happened when insertReplacementText event is triggered. We can easily know the new content that was added, but we have absolutely no way of knowing what was removed and where...
There are 2 ways that could solve this:
1. Provide extra data in the event: It could be considered that a replacement operation without information about what was replaced is kind of incomplete, and we could consider that this information is missing in the event itself
2. Trigger a deleteByReplacement event: Every operation that removes data from the editor triggers its own delete event but the replacement operation. Why is that?
In my opinion, only by listening to the events, a program should be able to tell exactly what happened to the editor without comparing the previous and the new content. That is exactly the logic behind event based programming. So, unless I'm missing something, there is something wrong here...
We are building a React rich text editor, and we succeeded to map all the changes made to the contentEditable component through input events (except the changes involved by insertReplacementText), into a custom model of ours, which make us able to add many features to the editor.
The text was updated successfully, but these errors were encountered:
Hi,
From everything I read so far, there is no way to get any information about what exactly happened when
insertReplacementText
event is triggered. We can easily know the new content that was added, but we have absolutely no way of knowing what was removed and where...There are 2 ways that could solve this:
1. Provide extra data in the event: It could be considered that a replacement operation without information about what was replaced is kind of incomplete, and we could consider that this information is missing in the event itself
2. Trigger a
deleteByReplacement
event: Every operation that removes data from the editor triggers its owndelete
event but thereplacement
operation. Why is that?In my opinion, only by listening to the events, a program should be able to tell exactly what happened to the editor without comparing the previous and the new content. That is exactly the logic behind event based programming. So, unless I'm missing something, there is something wrong here...
We are building a React rich text editor, and we succeeded to map all the changes made to the contentEditable component through input events (except the changes involved by insertReplacementText), into a custom model of ours, which make us able to add many features to the editor.
The text was updated successfully, but these errors were encountered: