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 : ModelData model.
logSeparator : StringSeparator between deltas.
stringifiedDeltas : StringDeltas to replay.
-
applyAllDeltas() → PromiseApplies all deltas to replay at once.
Returns
Promise
-
applyDeltas( numberOfDeltas ) → PromiseApplies
numberOfDeltasdeltas, beginning after the last applied delta (or first delta, if no deltas were applied).Parameters
numberOfDeltas : NumberThe number of deltas to apply.
Returns
Promise
-
applyNextDelta() → Promise.<Boolean>Applies the next delta to replay. Returns a promise with the
isFinishedparameter that istrueif the last delta in the replayer has been applied,falseotherwise.Returns
Promise.<Boolean>
-
getDeltasToReplay() → Array.<Delta>Returns deltas to replay.
Returns
Array.<Delta>
-
play( timeInterval ) → PromiseApplies all deltas with a delay between actions.
Parameters
timeInterval : NumberTime 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 : StringStringified deltas to replay.