ContentBlocks ContentBlocks 2.x Plugins
Plugins add manager-side behavior to blocks, layouts, or the canvas. Add a plugin to the plugins object in the relevant configuration.
Table of Contents
Core Plugins
| Plugin | Description |
|---|---|
| Background | Sets a block background color from an input value |
| Color | Sets block text color from an input value |
| Conditional Inputs | Shows or hides inputs based on other input values |
| Debug | Shows the serialized canvas data below the canvas |
| Fullscreen | Adds a fullscreen editing toolbar button |
| Highlight Changed | Highlights blocks with unsaved changes |
| Lockable | Block- and layout-level locking for protected content |
| Publishing | Block-level publishing state with schedule support |
| MiniRTE | Lightweight rich text on text/textarea fields (keyboard shortcuts) |
| Styler | Applies conditional inline styles from input values |
Custom Plugins
To create a custom plugin, extend ContentBlocks.Plugin and register an instance on ContentBlocks.Plugins. See Creating Plugins.
Example plugins on a Canvas
On your Canvas Configuration, you might add some global plugins like this:
{
"plugins": {
"HighlightChanged": {},
"Publishing": {},
"Fullscreen": {
"blocks": false,
"layouts": true
}
}
}
For the configuration on each plugin, check the detail pages.