-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
📝 Provide a description of the improvement
Current, model.deleteContent()
tries to fix the range-to-remove to provide better UX. If the range-to-delete is as follows:
<p>[Foo</p><p>]Bar</p>
Then deleteContent()
will act like the range ends in the first paragraph:
<p>[Foo]</p><p>Bar</p>
Which is a special handling for "triple click" behavior, where a lot of times user would not realize what selection they made and that they are about to merge the following paragraph (with "Bar").
However, in some cases, you want to remove exactly the range that you passed. One such case is track changes integration, where e.g. the insertion suggestion marker may be like in the first example, and upon discard you want to revert the whole insertion, so you don't want to shrink the range-to-delete. Right now, in track changes mode, if you write something, press enter and discard the suggestion, you will be incorrectly left with an empty paragraph.