Interface

ResizerOptions (widget)

@ckeditor/ckeditor5-widget/src/widgetresize

interface

Interface describing a resizer. It allows to specify the resizing host, custom logic for calculating aspect ratio, etc.

Filtering

Properties

  • editor : Editor

    Editor instance associated with the resizer.

  • getResizeHost : function

  • isCentered : function

  • modelElement : Element

  • onCommit : function

    A callback to be executed once the resizing process is done.

    It receives a Number (newValue) as a parameter.

    For example, ImageResize uses it to execute the image resize command which puts the new value into the model.

    {
        editor,
        modelElement: data.item,
        viewElement: widget,
    
        onCommit( newValue ) {
            editor.execute( 'imageResize', { width: newValue } );
        }
    };
  • viewElement : ContainerElement

    A view of an element to be resized. Typically it's the main widget's view instance.