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

  • downcastWriter : DowncastWriter

  • 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.

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