DeltaReplayer (engine/dev-utils)
@ckeditor/ckeditor5-engine/src/dev-utils/deltareplayer
Delta replayer is a development tool created for easy replaying of operations on the document from stringified deltas.
Filtering
Methods
-
constructor( model, logSeparator, stringifiedDeltas )
Parameters
model : Model
Data model.
logSeparator : String
Separator between deltas.
stringifiedDeltas : String
Deltas to replay.
-
applyAllDeltas() → Promise
Applies all deltas to replay at once.
Returns
Promise
-
applyDeltas( numberOfDeltas ) → Promise
Applies
numberOfDeltas
deltas, beginning after the last applied delta (or first delta, if no deltas were applied).Parameters
numberOfDeltas : Number
The number of deltas to apply.
Returns
Promise
-
applyNextDelta() → Promise.<Boolean>
Applies the next delta to replay. Returns a promise with the
isFinished
parameter that istrue
if the last delta in the replayer has been applied,false
otherwise.Returns
Promise.<Boolean>
-
getDeltasToReplay() → Array.<Delta>
Returns deltas to replay.
Returns
Array.<Delta>
-
play( timeInterval ) → Promise
Applies all deltas with a delay between actions.
Parameters
timeInterval : Number
Time between applying deltas.
Defaults to
1000
Returns
Promise
-
setStringifiedDeltas( stringifiedDeltas )
Parses the given string containing stringified deltas and sets parsed deltas as deltas to replay.
Parameters
stringifiedDeltas : String
Stringified deltas to replay.