Index: trunk/parsers/wikidom/lib/hype/models/es.DocumentModel.js |
— | — | @@ -908,6 +908,16 @@ |
909 | 909 | /** |
910 | 910 | * Generates a transaction which removes data from a given range. |
911 | 911 | * |
| 912 | + * When removing data inside an element, the data is simply discarded and the node's length is |
| 913 | + * adjusted accordingly. When removing data across elements, there are two situations that can cause |
| 914 | + * added complexity: |
| 915 | + * 1. A range spans between nodes of different levels or types |
| 916 | + * 2. A range only partially covers one or two nodes |
| 917 | + * |
| 918 | + * To resolve these issues in a predictable way the following rules must be obeyed: |
| 919 | + * 1. Structural elements are retained unless the range being removed covers the entire element |
| 920 | + * 2. Elements can only be merged if they are of the same time and share a common parent |
| 921 | + * |
912 | 922 | * @method |
913 | 923 | * @param {es.Range} range |
914 | 924 | * @returns {es.Transaction} |