Creates a merge operation.
Position inside the merged element. All nodes from that element after that position will be moved to #targetPosition.
Summary offset size of nodes which will be moved from the merged element to the new parent.
Position which the nodes from the merged elements will be moved to.
Position in graveyard to which the merged element will be moved.
Document module:engine/model/document~ModelDocument#version on which operation
can be applied or null if the operation operates on detached (non-document) tree.
module:engine/model/document~ModelDocument#version on which operation can be applied. If you try to module:engine/model/model~Model#applyOperation apply operation with different base version than the module:engine/model/document~ModelDocument#version document version the module:utils/ckeditorerror~CKEditorError model-document-applyOperation-wrong-version error is thrown.
module:engine/model/batch~Batch Batch to which the operation is added or null if the operation is not
added to any batch yet.
Note, that a #isDocumentOperation non-document operation has this property always set to null, and is never added
to any batch.
Position in graveyard to which the merged element will be moved.
Summary offset size of nodes which will be moved from the merged element to the new parent.
ReadonlyisDefines whether operation is executed on attached or detached module:engine/model/item~ModelItem items.
Position inside the merged element. All nodes from that element after that position will be moved to #targetPosition.
Position which the nodes from the merged elements will be moved to.
A selectable that will be affected by the operation after it is executed.
The exact returned parameter differs between operation types.
Position before the merged element (which will be deleted).
Artificial range that contains all the nodes from the merged element that will be moved to ~MergeOperation#sourcePosition.
The range starts at ~MergeOperation#sourcePosition and ends in the same parent, at POSITIVE_INFINITY offset.
Operation type.
StaticclassName of the operation class used for serialization.
InternalExecutes the operation - modifications described by the operation properties will be applied to the model tree.
InternalChecks whether the operation's parameters are correct and the operation can be correctly executed. Throws an error if operation is not valid.
Creates and returns an operation that has the same parameters as this operation.
See module:engine/model/operation/operation~Operation#getReversed Operation#getReversed().
Custom toJSON method to solve child-parent circular dependencies.
Clone of this object with the operation property replaced with string.
StaticfromCreates MergeOperation object from deserialized object, i.e. from parsed JSON string.
Deserialized JSON object.
Document on which this operation will be applied.
Operation to merge two module:engine/model/element~ModelElement elements.
The merged element is the parent of ~MergeOperation#sourcePosition and it is merged into the parent of ~MergeOperation#targetPosition. All nodes from the merged element are moved to ~MergeOperation#targetPosition.
The merged element is moved to the graveyard at ~MergeOperation#graveyardPosition.