Class

IndentUsingOffset (indent/indentcommandbehavior)

@ckeditor/ckeditor5-indent/src/indentcommandbehavior/indentusingoffset

class

The block indentation behavior that uses offsets to set indentation.

Filtering

Properties

  • isForward : boolean

    The direction of indentation.

  • offset : number

    The offset of the next indentation step.

  • unit : string

    Indentation unit.

Methods

  • constructor( config = { config.direction, config.offset, config.unit } )

    Creates an instance of the indentation behavior.

    Parameters

    config : object
    Properties
    config.direction : 'forward' | 'backward'

    The direction of indentation.

    config.offset : number

    The offset of the next indentation step.

    config.unit : string

    Indentation unit.

  • checkEnabled( indentAttributeValue ) → boolean

    Checks if the command should be enabled.

    Parameters

    indentAttributeValue : string

    Returns

    boolean
  • getNextIndent( indentAttributeValue ) → undefined | string

    Returns a new indent attribute value based on the current indent. This method returns undefined when the indentation should be removed.

    Parameters

    indentAttributeValue : string

    Returns

    undefined | string