Interface

IndentBlockConfig (indent)

@ckeditor/ckeditor5-indent/src/indentblock

interface

The configuration of the block indentation feature.

If no classes are set, the block indentation feature will use offset and unit to create indentation steps.

ClassicEditor
	.create( editorElement, {
		indentBlock: {
			offset: 2,
			unit: 'em'
		}
	} )
	.then( ... )
	.catch( ... );

Alternatively, the block indentation feature may set one of defined classes as indentation steps:

ClassicEditor
	.create( editorElement, {
		indentBlock: {
			classes: [
				'indent-a', // The first step - smallest indentation.
				'indent-b',
				'indent-c',
				'indent-d',
				'indent-e' // The last step - biggest indentation.
			]
		}
	} )
	.then( ... )
	.catch( ... );

In the example above only 5 indentation steps will be available.

See all editor options.

Filtering

Properties

  • classes : Array.<String> | undefined

    An optional list of classes to use for indenting the editor content. If not set or set to an empty array, no classes will be used. The indentBlock.unit and indentBlock.offset properties will be used instead.

    Defaults to undefined

  • offset : Number

    The size of indentation units for each indentation step.

    Defaults to 40

  • unit : String

    The unit used for indentation offset.

    Defaults to 'px'