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.

  • getHandleHost : ( HTMLElement ) => HTMLElement

  • getResizeHost : ( HTMLElement ) => HTMLElement

  • isCentered : ( Resizer ) => boolean | undefined

  • modelElement : Element

  • onCommit : ( string ) => void

    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 resize image command which puts the new value into the model.

    {
    	editor,
    	modelElement: data.item,
    	viewElement: widget,
    
    	onCommit( newValue ) {
    		editor.execute( 'resizeImage', { width: newValue } );
    	}
    };
    
  • unit : 'px' | '%' | undefined

  • viewElement : ContainerElement

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