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 : String

    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

    The current indent attribute value.

    Returns

    Boolean
  • getNextIndent( indentAttributeValue ) → String | undefined

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

    Parameters

    indentAttributeValue : String

    The current indent attribute value.

    Returns

    String | undefined