Toolbar

target #

Type: String

Default: false

Sets the toolbar to the specified layer by element selector.


Redactor('#entry', {
    toolbar: {
        target: '#external-toolbar'
    }
});

sharedTarget #

Type: Boolean

Default: false

Specifies that all external toolbars will be placed in a single layer and only the toolbar whose editor has the focus will be shown.


Redactor('#entry-1', {
    toolbar: {
        target: '#external-toolbar',
        sharedTarget: true
    }
});

Redactor('#entry-2', {
    toolbar: {
        target: '#external-toolbar',
        sharedTarget: true
    }
});

sticky #

Type: Boolean

Default: true

By default, when scrolling the page, the toolbar becomes sticky at the top of the browser window. This can be disabled like this:

Redactor('#entry', {
    toolbar: {
        sticky: false
    }
});

stickyTopOffset #

Type: Number

Default: 0

If you already have a sticky navigation on the page or another layer bound to the scroll, then you can change the position of the editor toolbar using this setting. The setting value is specified in pixels.

Redactor('#entry', {
    toolbar: {
        stickyTopOffset: 40
    }
});

stickyMinHeight #

Type: Number

Default: 200

This setting allows you to specify the minimum height of the editor at which the sticky toolbar is activated.

Redactor('#entry', {
    toolbar: {
        stickyMinHeight: 300 // pixels
    }
});

hide #

Type: Array

Default: false

This setting helps to hide the specified buttons on the toolbar.

Redactor('#entry', {
    toolbar: {
        hide: ['italic', 'deleted']
    }
});

disable #

You can turn off the toolbar completely, just set false.

Redactor('#entry', {
    toolbar: false
});