OperationReplayer (engine/dev-utils)
@ckeditor/ckeditor5-engine/src/dev-utils/operationreplayer
Operation replayer is a development tool created for easy replaying of operations on the document from stringified operations.
Filtering
Methods
-
constructor( model, logSeparator, stringifiedOperations )
module:engine/dev-utils/operationreplayer~OperationReplayer#constructor
Parameters
model : Model
Data model.
logSeparator : String
Separator between operations.
stringifiedOperations : String
Operations to replay.
-
applyAllOperations() → Promise
module:engine/dev-utils/operationreplayer~OperationReplayer#applyAllOperations
-
applyNextOperation() → Promise.<Boolean>
module:engine/dev-utils/operationreplayer~OperationReplayer#applyNextOperation
Applies the next operation to replay. Returns a promise with the
isFinished
parameter that istrue
if the last operation in the replayer has been applied,false
otherwise.Returns
Promise.<Boolean>
-
applyOperations( numberOfOperations ) → Promise
module:engine/dev-utils/operationreplayer~OperationReplayer#applyOperations
Applies
numberOfOperations
operations, beginning after the last applied operation (or first, if no operations were applied).Parameters
numberOfOperations : Number
The number of operations to apply.
Returns
Promise
-
getOperationsToReplay() → Array.<Operation>
module:engine/dev-utils/operationreplayer~OperationReplayer#getOperationsToReplay
-
play( timeInterval ) → Promise
module:engine/dev-utils/operationreplayer~OperationReplayer#play
Applies all operations with a delay between actions.
Parameters
timeInterval : Number
Time between applying operations.
Defaults to
1000
Returns
Promise
-
setStringifiedOperations( stringifiedOperations )
module:engine/dev-utils/operationreplayer~OperationReplayer#setStringifiedOperations
Parses the given string containing stringified operations and sets parsed operations as operations to replay.
Parameters
stringifiedOperations : String
Stringified operations to replay.
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.