Sign up (with export icon)

restricted-editing/restrictededitingmode/utils

Api-module icon module

Functions

  • Chevron-right icon

    getMarkerAtPosition( editor, position ) → undefined | Marker
    internal

    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 : ModelPosition

    Returns

    undefined | Marker
  • Chevron-right icon

    isPositionInRangeBoundaries( range, position ) → boolean
    internal

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

    Parameters

    range : ModelRange
    position : ModelPosition

    Returns

    boolean
  • Chevron-right icon

    isSelectionInMarker( selection, [ marker ] ) → boolean
    internal

    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
    
    Copy code

    Parameters

    selection : ModelDocumentSelection
    [ marker ] : Marker

    Returns

    boolean