mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 14:33:59 +00:00
Added some new documentation for the new merging rules
This commit is contained in:
parent
824cea173a
commit
5784d5f6f5
|
@ -815,7 +815,12 @@ es.DocumentModel.prototype.prepareInsertion = function( offset, data ) {
|
|||
*
|
||||
* To resolve these issues in a predictable way the following rules must be obeyed:
|
||||
* 1. Structural elements are retained unless the range being removed covers the entire element
|
||||
* 2. Elements can only be merged if they are of the same time and share a common parent
|
||||
* 2. Elements can only be merged if they are
|
||||
* 2a. of the same type
|
||||
* 2b. of the same depth
|
||||
* 2c. share at least one ancestor fo the same type
|
||||
* 3. Merge takes place at the highest ancestor that both nodes share when each ancestral step
|
||||
* has the same type and depth
|
||||
*
|
||||
* @method
|
||||
* @param {es.Range} range
|
||||
|
|
Loading…
Reference in a new issue