Block Editor Enhancements
Various UX Enhancements for the Block Editor in WordPress
by nexTab - Oliver Gehrmann · github.com/nextab/nxt-block-editor-enhancements
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/nextab/nxt-block-editor-enhancements/archive/refs/heads/main.zipReadme
Block Editor Enhancements
English
WordPress plugin by nexTab that keeps frequently used block inspector controls visible — without opening the panel options menu (⋮) in Design → Dimensions or Design → Layout every time.
Extracted from editor hacks in the Alu-Star theme; runs as a lightweight plugin with per-feature toggles.
What it does
In the block inspector (Design / Styles tab), WordPress hides many controls by default. You normally enable them via each panel’s kebab menu. This plugin does that automatically when you select a block — each feature can be turned off individually.
| Feature | Panel | Effect |
|---|---|---|
| Show padding | Design → Dimensions | Padding visible immediately |
| Unlink padding sides | Design → Dimensions | Separate Top / Right / Bottom / Left inputs |
| Show margin | Design → Dimensions | Margin visible immediately |
| Unlink margin sides | Design → Dimensions | Four separate margin fields |
| Group layout widths | Design → Layout | Content width, Wide width, Justification |
All options are enabled by default (matches the previous theme behaviour).
Requirements
- WordPress 6.5+
- PHP 7.4+
- Block theme / Gutenberg with spacing and layout supports (e.g.
core/group)
No Node.js, no build step. Editor logic: vanilla JS via wp.hooks / wp.data.
Installation
- Copy the
nxt-block-editor-enhancementsfolder towp-content/plugins/ - Activate under Plugins → Installed Plugins
- Optional: Settings → Block Editor Enhancements — toggle features individually
A Settings link is also available on the plugins list screen.
Settings
Path: Settings → Block Editor Enhancements
Three sections with visual previews:
- Padding — box model with hatched inner spacing
- Margin — box model with hatched outer spacing
- Layout — icons for content width and wide width
Options are stored in nxt_block_editor_enhancements_settings. Removed on plugin uninstall (uninstall.php).
How it works
Show padding / margin
The blocks.registerBlockType filter sets for supported blocks:
supports.spacing.defaultControls.padding = true
supports.spacing.__experimentalDefaultControls.padding = true
(same for margin). Official Gutenberg API — no DOM hack.
Unlink sides & layout widths
Gutenberg has no defaultControls API for these. The plugin:
- switches to the Design / Styles tab when needed (important if other plugins default to a Content tab),
- opens the panel options menu,
- enables hidden checkboxes (content width, wide width, justification),
- closes the menu again,
- restores canvas focus (no focus steal from the editor iframe).
Known interaction: Content Blocker
Plugins such as nxt-content-blocker that register InspectorControls with group="content" on core/group may open the Content tab by default. Dimensions and layout live under Design. This plugin briefly switches to Design for layout/unlink actions.
File structure
nxt-block-editor-enhancements/
├── nxt-block-editor-enhancements.php # Bootstrap, textdomain, activation
├── uninstall.php
├── README.md
├── assets/
│ ├── css/admin-settings.css # Settings screen
│ └── js/editor.js # Editor hooks & inspector helpers
├── includes/
│ ├── class-settings.php # Options & defaults
│ ├── class-admin.php # Settings UI
│ └── class-editor.php # Script enqueue
└── languages/
├── nxt-block-editor-enhancements.pot
├── nxt-block-editor-enhancements-de_DE.po
├── nxt-block-editor-enhancements-de_DE.mo
└── nxt-block-editor-enhancements-de_DE.l10n.php
Translations
Text domain: nxt-block-editor-enhancements
German (de_DE) is bundled (.po, .mo, .l10n.php). After string changes:
msgfmt -o languages/nxt-block-editor-enhancements-de_DE.mo languages/nxt-block-editor-enhancements-de_DE.po
Keep .l10n.php in sync with .po when needed (WordPress 6.5+ prefers PHP translations).
Out of scope
- No grid hack — column count / auto-fit is handled by WordPress core in recent versions.
- No frontend JS — block editor only.
- No shortcodes / blocks — inspector enhancement only.
License
GPL-2.0-or-later — use GNU General Public License v2.0 on GitHub (not a bare “GPL” search).
Author
nexTab – Oliver Gehrmann
https://nextab.de
Deutsch
WordPress-Plugin von nexTab, das häufig genutzte Inspektor-Steuerelemente im Block-Editor sofort sichtbar macht — ohne jedes Mal das Optionsmenü (⋮) in Design → Maße bzw. Design → Layout öffnen zu müssen.
Entstanden aus Editor-Hacks im Alu-Star-Theme; läuft als schlanke, einzeln abschaltbare Erweiterung.
Was das Plugin macht
Im Block-Inspektor (Tab Design / Stile) blendet WordPress viele Steuerelemente standardmäßig aus. Man muss sie über das Kebab-Menü des jeweiligen Panels aktivieren. Das Plugin übernimmt das automatisch beim Block-Wechsel — optional pro Feature.
| Feature | Panel | Wirkung |
|---|---|---|
| Padding anzeigen | Design → Maße | Innenabstand sofort sichtbar |
| Padding-Seiten entkoppeln | Design → Maße | Oben / Rechts / Unten / Links getrennt |
| Margin anzeigen | Design → Maße | Außenabstand sofort sichtbar |
| Margin-Seiten entkoppeln | Design → Maße | vier getrennte Margin-Felder |
| Layout-Breiten (Gruppe) | Design → Layout | Inhaltsbreite, erweiterte Breite, Anordnung |
Alle Optionen sind standardmäßig aktiv (entspricht dem früheren Theme-Verhalten).
Anforderungen
- WordPress 6.5+
- PHP 7.4+
- Block-Theme / Gutenberg-Editor mit Spacing- und Layout-Supports (z. B.
core/group)
Kein Node.js, kein Build-Schritt. Editor-Logik: Vanilla JS über wp.hooks / wp.data.
Installation
- Ordner
nxt-block-editor-enhancementsnachwp-content/plugins/legen - Unter Plugins → Installierte Plugins aktivieren
- Optional: Einstellungen → Block Editor Enhancements — Features einzeln an/aus
Über die Plugin-Liste geht es auch direkt per Link Einstellungen.
Einstellungen
Pfad: Einstellungen → Block Editor Enhancements
Drei Bereiche mit Kurzskizzen:
- Padding (Innenabstand) — Box-Modell mit schraffiertem Innenabstand
- Margin (Außenabstand) — Box-Modell mit schraffiertem Außenabstand
- Layout — Icons für Inhaltsbreite und erweiterte Breite
Optionen werden in nxt_block_editor_enhancements_settings gespeichert. Beim Deinstallieren des Plugins werden sie entfernt (uninstall.php).
Technischer Überblick
Padding / Margin sichtbar machen
Filter blocks.registerBlockType setzt für unterstützte Blöcke:
supports.spacing.defaultControls.padding = true
supports.spacing.__experimentalDefaultControls.padding = true
(analog für margin). Das ist die offizielle Gutenberg-API — kein DOM-Hack.
Seiten entkoppeln & Layout-Breiten
Gutenberg bietet dafür keine defaultControls-API. Das Plugin:
- wechselt bei Bedarf auf den Tab Design / Stile (wichtig, wenn andere Plugins z. B. einen Content-Tab als Standard setzen),
- öffnet das Panel-Optionsmenü,
- aktiviert die ausgeblendeten Checkboxen (Inhaltsbreite, erweiterte Breite, Anordnung),
- schließt das Menü wieder,
- stellt den Canvas-Fokus wieder her (kein Fokus-Klau aus dem Iframe).
Bekannte Interaktion: Content Blocker
Plugins wie nxt-content-blocker, die bei core/group ein InspectorControls-Panel mit group="content" registrieren, können den Inspektor standardmäßig auf den Content-Tab legen. Maße und Layout liegen aber unter Design. Das Enhancement-Plugin schaltet deshalb bei Layout-/Unlink-Aktionen kurz auf Design um.
Dateistruktur
nxt-block-editor-enhancements/
├── nxt-block-editor-enhancements.php # Bootstrap, Textdomain, Activation
├── uninstall.php
├── README.md
├── assets/
│ ├── css/admin-settings.css # Settings-Seite
│ └── js/editor.js # Editor-Hooks & Inspektor-Helfer
├── includes/
│ ├── class-settings.php # Option & Defaults
│ ├── class-admin.php # Settings-UI
│ └── class-editor.php # Script-Enqueue
└── languages/
├── nxt-block-editor-enhancements.pot
├── nxt-block-editor-enhancements-de_DE.po
├── nxt-block-editor-enhancements-de_DE.mo
└── nxt-block-editor-enhancements-de_DE.l10n.php
Übersetzungen
Textdomain: nxt-block-editor-enhancements
Deutsch (de_DE) ist mitgeliefert (.po, .mo, .l10n.php). Nach Änderungen an Strings:
msgfmt -o languages/nxt-block-editor-enhancements-de_DE.mo languages/nxt-block-editor-enhancements-de_DE.po
Die .l10n.php bei Bedarf aus der .po synchron halten (WordPress 6.5+ bevorzugt PHP-Übersetzungen).
Was bewusst nicht drin ist
- Kein Grid-Hack — Spaltenanzahl / Auto-Fit regelt WordPress Core seit neueren Versionen selbst.
- Kein Frontend-JS — nur Block-Editor.
- Keine Shortcodes / Blöcke — reine Inspektor-Ergänzung.
Lizenz
GPL-2.0-or-later — auf GitHub GNU General Public License v2.0 wählen (nicht nur „GPL“ suchen).
Autor
nexTab – Oliver Gehrmann
https://nextab.de