Visual Blocks
Plugin alias: visualblocks
editor42.init({
plugins: 'visualblocks'
});
Toggles the visibility of block-level element outlines in the editor by adding or removing the CSS class editor42-m-visualblocks on the editor body. When active, block elements are rendered with visible borders and labels, helping authors understand document structure.
Options
| Option | Type | Default | Description |
|---|---|---|---|
visualblocks_default_state | boolean | false | Enable visual blocks automatically on init. |
Commands
| Command | Description |
|---|---|
editor42VisualBlocks | Toggles visual blocks on/off. |
Toolbar buttons
| Button | Type | Description |
|---|---|---|
visualblocks | Toggle button | Toggles visual blocks on/off. |
Menu items
| Item | Type | Description |
|---|---|---|
visualblocks | Toggle menu item | Toggles visual blocks on/off. |
Events
| Event | Description |
|---|---|
VisualBlocks | Fired when toggled. Payload: { state: boolean }. |