LiveRange (engine/model)
@ckeditor/ckeditor5-engine/src/model/liverange
Filtering
Methods
-
constructor()
module:engine/model/liverange~LiveRange#constructor
Creates a live range.
Related:
-
detach()
module:engine/model/liverange~LiveRange#detach
Unbinds all events previously bound by
LiveRange
. Use it whenever you don't needLiveRange
instance anymore (i.e. when leaving scope in which it was declared or before re-assigning variable that was referring to it). -
is( type ) → Boolean
module:engine/model/liverange~LiveRange#is
Checks whether this object is of the given.
liveRange.is( 'range' ); // -> true liveRange.is( 'model:range' ); // -> true liveRange.is( 'liveRange' ); // -> true liveRange.is( 'model:liveRange' ); // -> true liveRange.is( 'view:range' ); // -> false liveRange.is( 'documentSelection' ); // -> false
Check the entire list of model objects which implement the
is()
method.Parameters
type : String
Returns
Boolean
-
Creates a range instance that is equal to this live range.
Returns
Static methods
-
Creates a
LiveRange
instance that is equal to the given range. -
_createFromPositionAndShift( position, shift ) → LiveRange
module:engine/model/liverange~LiveRange._createFromPositionAndShift
protected static
Events
-
change:content( eventInfo, range, data = { data.deletionPosition } )
module:engine/model/liverange~LiveRange#event:change:content
Fired when
LiveRange
instance boundaries have not changed after a change in document but the change took place inside the range, effectively changing its content.Parameters
eventInfo : EventInfo
An object containing information about the fired event.
range : Range
Range with start and end position equal to start and end position of change range.
data : Object
Object with additional information about the change.
Propertiesdata.deletionPosition : null
Due to the nature of this event, this property is always set to
null
. It is passed for compatibility with theevent-change:range
event.
-
change:range( eventInfo, oldRange, data = { data.deletionPosition } )
module:engine/model/liverange~LiveRange#event:change:range
Fired when
LiveRange
instance boundaries have changed due to changes in the document.Parameters
eventInfo : EventInfo
An object containing information about the fired event.
oldRange : Range
Range with start and end position equal to start and end position of this live range before it got changed.
data : Object
Object with additional information about the change.
Propertiesdata.deletionPosition : Position | null
Source position for remove and merge changes. Available if the range was moved to the graveyard root,
null
otherwise.
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.