MarkerOperation (engine/model/operation)
@ckeditor/ckeditor5-engine/src/model/operation/markeroperation
Filtering
Properties
-
affectsData : Boolean
readonly
Specifies whether the marker operation affects the data produced by the data pipeline (is persisted in the editor's data).
-
baseVersion : Number
inherited
version
on which operation can be applied. If you try to apply operation with different base version than the document version the model-document-applyOperation-wrong-version error is thrown. -
Batch to which the operation is added or
null
if the operation is not added to any batch yet. -
isDocumentOperation : Boolean
readonly inherited
Defines whether operation is executed on attached or detached items.
-
name : String
readonly
Marker name.
-
Marker range after the change.
-
Marker range before the change.
-
type : String
readonly inherited
Operation type.
Overrides: Operation#type -
_markers : MarkerCollection
private
Marker collection on which change should be executed.
Static properties
-
className : String
inherited static
Name of the operation class used for serialization.
Methods
-
constructor( name, oldRange, newRange, markers, affectsData, baseVersion )
Parameters
name : String
Marker name.
oldRange : Range
Marker range before the change.
newRange : Range
Marker range after the change.
markers : MarkerCollection
Marker collection on which change should be executed.
affectsData : Boolean
Specifies whether the marker operation affects the data produced by the data pipeline (is persisted in the editor's data).
baseVersion : Number | null
Document
version
on which operation can be applied ornull
if the operation operates on detached (non-document) tree.
Overrides: Operation#constructor -
clone() → MarkerOperation
Creates and returns an operation that has the same parameters as this operation.
-
-
toJSON() → Object
inherited
Custom toJSON method to solve child-parent circular dependencies.
Returns
Object
Clone of this object with the operation property replaced with string.
Overrides: Operation#toJSON -
_execute()
protected inherited
Executes the operation - modifications described by the operation properties will be applied to the model tree.
Overrides: Operation#_execute -
_validate()
protected inherited
Checks whether the operation's parameters are correct and the operation can be correctly executed. Throws an error if operation is not valid.
Static methods
-
fromJSON( json, document ) → MarkerOperation
static
Creates
MarkerOperation
object from deserialized object, i.e. from parsed JSON string.Parameters
json : Object
Deserialized JSON object.
document : Document
Document on which this operation will be applied.
Returns