Module

restricted-editing/restrictededitingmode/utils

@ckeditor/ckeditor5-restricted-editing/src/restrictededitingmode/utils

module

Filtering

Functions

  • getMarkerAtPosition( editor, position ) → Marker | undefined

    Returns a single "restricted-editing-exception" marker at a given position. Contrary to getMarkersAtPosition, it returnd a marker also when the postion is equal to one of the marker's start or end positions.

    Parameters

    editor : Editor
    position : Position

    Returns

    Marker | undefined

    marker

  • isPositionInRangeBoundaries( range, position ) → Boolean

    Checks if the position is fully contained in the range. Positions equal to range start or end are considered "in".

    Parameters

    range : Range
    position : Position

    Returns

    Boolean
  • isSelectionInMarker( selection, marker ) → Boolean

    Checks if the selection is fully contained in the marker. Positions on marker boundaries are considered "in".

    <marker>[]foo</marker> -> true
    <marker>f[oo]</marker> -> true
    <marker>f[oo</marker> ba]r -> false
    <marker>foo</marker> []bar -> false
    

    Parameters

    selection : Selection
    marker : Marker

    Returns

    Boolean