control#
Type: boolean | object
Default: true
Enables the control bar. Pass false to disable it globally.
Use an object to customize the control dropdown at init:
| Key | Type | Description |
|---|---|---|
addDropdown |
object |
Extra dropdown items (name → button config). |
hideDropdown |
string[] |
Built-in dropdown item names to hide. |
const app = Redactor('#entry', {
control: {
hideDropdown: ['duplicate'],
addDropdown: {
blockColor: {
title: 'Color',
command: 'blockColor.open'
}
}
}
});
control.addDropdown#
Type: object
Default: {}
Adds items to the control dropdown (merged with plugin/runtime app.control.addDropdown).
const app = Redactor('#entry', {
control: {
addDropdown: {
blockColor: {
title: 'Color',
command: 'blockColor.open'
}
}
}
});
control.hideDropdown#
Type: string[]
Default: []
Hides built-in control dropdown items by name.
const app = Redactor('#entry', {
control: {
hideDropdown: ['duplicate', 'trash']
}
});