Report an issue
Interface

AlignmentConfig (alignment)

@ckeditor/ckeditor5-alignment/src/alignment

interface

The configuration of the alignment feature.

ClassicEditor
    .create( editorElement, {
        alignment: {
            options: [ 'left', 'right' ]
        }
    } )
    .then( ... )
    .catch( ... );

See all editor configuration options.

Filtering

Properties

  • options : Array.<String>

    Available alignment options.

    The available options are: 'left', 'right', 'center' and 'justify'. Other values are ignored.

    Note: It is recommended to always use 'left' as it is the default value which the user should normally be able to choose.

    ClassicEditor
        .create( editorElement, {
            alignment: {
                options: [ 'left', 'right' ]
            }
        } )
        .then( ... )
        .catch( ... );

    See the demo of custom alignment options.