The Move operation takes three markup pointers: two for the source range to move, and a third for the destination. The effect on the content in the source markup is identical to the Remove operation. The content that was in the source will be moved into the markup specified by the target pointer.
All elements completely encompassed by the source range are moved intact to the target. That is, the identities of these elements are preserved. Elements that are completely outside the range of the source are unaffected, and are not transferred to the destination. However, elements that partially overlap the source range are cloned, and their CloneElements are moved to the target. Thus, given the preceding example in the Move operation, if that range were to be moved to the position shown in the following example:
X[pdest]Y
It would produce the following:
X[pdest]<I'>d<S>e</I'>f<U'>g</S>h</U'>Y
Notice that [pdest] is to the left of the newly inserted moved content. This is because it had left gravity. Notice that there are I' and U' elements. These are clones of the original I and U elements that were left back at the source. Elements can live only in one markup, and must influence one contiguous range in that markup. Note that the S element was not influenced by CloneElement. This is because the S element was entirely surrounded by the start and end pointers in the source before the move.
Tip Quite often, after a move (or a copy for that matter), you will want to have two pointers to the left and right, respectively, of the newly inserted content. To do this, create two markup pointers before the move: one with left gravity and another with right gravity. Place these two pointers at the destination pointer, then perform the move. After the move, the pointer with left gravity will be located to the left, and the pointer with right gravity will be located to the right of the newly moved/copied content.
Note The destination of the move can be between the source start and the source end of the range to move.