MergeDelta (engine/model/delta)
@ckeditor/ckeditor5-engine/src/model/delta/mergedelta
To provide specific OT behavior and better collisions solving, merge method
uses the MergeDelta class which inherits from the Delta class and may overwrite some methods.
Filtering
Properties
-
baseVersion : Number | nullinherited
Returns delta base version which is equal to the base version of the first operation in delta. If there are no operations in delta, returns
null.Overrides: Delta#baseVersion -
operations : Array.<Operation>readonly inherited
Array of operations which compose delta.
-
Position between to merged nodes or
nullif the delta has no operations. -
type : Stringreadonly inherited
Delta type.
Overrides: Delta#type -
_removeOperation : MoveOperation | nullprotected readonly
Operation in this delta that removes the node after merge position (which will be empty at that point) or
nullif the delta has no operations. Note, that after transformation this might be an instance ofMoveOperationinstead ofRemoveOperation. -
_reverseDeltaClass : functionprivate inherited
A class that will be used when creating reversed delta.
Overrides: Delta#_reverseDeltaClass
Static properties
-
className : Stringreadonly inherited static
Methods
-
constructor()inherited
Creates a delta instance.
-
addOperation( operation )inherited
Add operation to the delta.
Parameters
operation : OperationOperation instance.
-
Creates and returns a delta that has the same parameters as this delta.
Returns
DeltaClone of this delta.
-
getReversed() → Deltainherited
Creates and returns a reverse delta. Reverse delta when executed right after the original delta will bring back tree model state to the point before the original delta execution. In other words, it reverses changes done by the original delta.
-
toJSON() → Objectinherited
Custom toJSON method to make deltas serializable.
Returns
ObjectClone of this delta with added class name.