Documentation

Addbar

Type: Object

Default: object

The addbar setting helps to manage popup, which adds blocks to the editor.

By default, the addbar has the following button object:

{
    text: {
        title: '',
        command: 'block.addBlock'
    },
    image: {
        title: '',
        command: 'image.buildPopup',
        observer: 'image.observeAdd'
    },
    embed: {
        title: '',
        command: 'embed.buildPopup',
        observer: 'embed.observeAdd'
    },
    line: {
        title: '',
        command: 'block.addBlock',
        observer: 'block.observeAdd'
    },
    table: {
        title: '',
        command: 'table.addBlock',
        observer: 'table.observeAdd'
    },
    snippet: {
        title: '',
        command: 'snippet.buildPopup',
        observer: 'snippet.observeAdd'
    },
    quote: {
        title: '',
        command: 'block.addBlock',
        observer: 'block.observeAdd'
    },
    code: {
        title: '',
        command: 'code.buildPopup',
        observer: 'code.observeAdd'
    },
    grid: {
        title: '',
        command: 'grid.buildPopup',
        observer: 'grid.observeAdd'
    },
    layer: {
        title: '',
        command: 'block.addBlock',
        observer: 'block.observeAdd'
    }
}

You can change the addbar object and turn off some options for adding blocks, like this:

ArticleEditor('#entry', {
    addbar: {
        text: {
            title: '',
            command: 'block.addBlock'
        },
        line: {
            title: '',
            command: 'block.addBlock',
            observer: 'block.observeAdd'
        },
        image: false,
        embed: false,
        table: false,
        snippet: false,
        quote: false,
        code: false,
        grid: false,
        layer: false
    }
});

Note that if the image uploading, embed/code insertion and some other features is disabled, the corresponding addbar buttons are automatically hidden.

You can completely disable the addbar, for this set the setting to false.

ArticleEditor('#entry', {
    addbar: false
});