Context

context#

Type: Boolean

Default: false

The context bar appears when text is selected.

Redactor('#entry', {
    context: true
});

click#

Type: Boolean

Default: false

Enable display of context toolbar when you click on text, in addition to showing when text is selected.


Redactor('#entry', {
    context: {
        click: true
    }
});

exclude#

Type: Object

Default: false

This setting excludes tags or blocks for which the context bar will not be shown.


Redactor('#entry', {
    context: {
        exclude: {
            tags: ['h1', 'pre'],
            blocks: ['quote']
        }
    }
});

You can specify only blocks or only tags.


Redactor('#entry', {
    context: {
        exclude: {
            blocks: ['quote']
        }
    }
});

include#

Type: Object

Default: false

This setting specifies tags or blocks for which the context bar will be shown.


Redactor('#entry', {
    context: {
        include: {
            tags: ['h1', 'p', 'pre'],
            blocks: ['heading', 'quote']
        }
    }
});

You can specify only blocks or only tags.


Redactor('#entry', {
    context: {
        include: {
            blocks: ['heading', 'quote']
        }
    }
});