Sign up (with export icon)

restricted-editing/restrictededitingmode/converters

Api-module icon module

Functions

  • Chevron-right icon

    A post-fixer that extends a marker when the user types on its boundaries.

    Parameters

    editor : Editor

    Returns

    ModelPostFixer
  • Chevron-right icon

    A post-fixer that prevents removing a collapsed marker from the document.

    Parameters

    editor : Editor

    Returns

    ModelPostFixer
  • Chevron-right icon

    setupExceptionHighlighting( editor ) → void
    internal

    Adds a visual highlight style to a restricted editing exception that the selection is anchored to.

    The highlight is turned on by adding the .restricted-editing-exception_selected class to the exception in the view:

    • The class is removed before the conversion starts, as callbacks added with the 'highest' priority to DowncastDispatcher events.
    • The class is added in the view post-fixer, after other changes in the model tree are converted to the view.

    This way, adding and removing the highlight does not interfere with conversion.

    Parameters

    editor : Editor

    Returns

    void
  • Chevron-right icon

    upcastHighlightToMarker( config = { config.model, config.view } ) → ( dispatcher: UpcastDispatcher ) => void
    internal

    A view highlight-to-marker conversion helper.

    Parameters

    config : object

    Conversion configuration.

    Properties
    config.model : () => string
    config.view : MatcherPattern

    Returns

    ( dispatcher: UpcastDispatcher ) => void