Report an issue
Module

engine/conversion/upcast-selection-converters

@ckeditor/ckeditor5-engine/src/conversion/upcast-selection-converters

module

Contains view selection to model selection conversion helpers.

Filtering

Functions

  • convertSelectionChange( model, mapper ) → function

    static

    Function factory, creates a callback function which converts a view selection taken from the event-selectionChange event and sets in on the model.

    Note: because there is no view selection change dispatcher nor any other advanced view selection to model conversion mechanism, the callback should be set directly on view document.

    view.document.on( 'selectionChange', convertSelectionChange( modelDocument, mapper ) );

    Parameters

    model : Model

    Data model.

    mapper : Mapper

    Conversion mapper.

    Returns

    function

    event-selectionChange callback function.