IndentBlockConfig
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( ... );
Copy code
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( ... );
Copy code
In the example above only 5 indentation steps will be available.
See all editor options.
Properties
classes : Array<string> | undefinedmodule:indent/indentconfig~IndentBlockConfig#classesAn 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.unitandindentBlock.offsetproperties will be used instead.Defaults to
undefinedoffset : number | undefinedmodule:indent/indentconfig~IndentBlockConfig#offsetThe size of indentation units for each indentation step.
Defaults to
40unit : string | undefinedmodule:indent/indentconfig~IndentBlockConfig#unit