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
Properties
-
private
_logSeparator : string
module:engine/dev-utils/operationreplayer~OperationReplayer#_logSeparator
-
private
_operationsToReplay : Array<Operation>
module:engine/dev-utils/operationreplayer~OperationReplayer#_operationsToReplay
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<void>
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 ) → undefined | Promise<void>
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
undefined | Promise<void>
-
getOperationsToReplay() → Array<Operation>
module:engine/dev-utils/operationreplayer~OperationReplayer#getOperationsToReplay
-
play( timeInterval ) → Promise<void>
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<void>
-
setStringifiedOperations( stringifiedOperations ) → void
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.
Returns
void
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.
With the release of version 42.0.0, we have rewritten much of our documentation to reflect the new import paths and features. We appreciate your feedback to help us ensure its accuracy and completeness.