WP Manifestindependent plugin directory
manifest / editor / nxt-block-editor-enhancements

Block Editor Enhancements

Various UX Enhancements for the Block Editor in WordPress

by nexTab - Oliver Gehrmann · github.com/nextab/nxt-block-editor-enhancements

0stars
0forks

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.zip

Readme

Block Editor Enhancements

English · Deutsch


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

  1. Copy the nxt-block-editor-enhancements folder to wp-content/plugins/
  2. Activate under Plugins → Installed Plugins
  3. 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:

  1. switches to the Design / Styles tab when needed (important if other plugins default to a Content tab),
  2. opens the panel options menu,
  3. enables hidden checkboxes (content width, wide width, justification),
  4. closes the menu again,
  5. 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

  1. Ordner nxt-block-editor-enhancements nach wp-content/plugins/ legen
  2. Unter Plugins → Installierte Plugins aktivieren
  3. 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:

  1. wechselt bei Bedarf auf den Tab Design / Stile (wichtig, wenn andere Plugins z. B. einen Content-Tab als Standard setzen),
  2. öffnet das Panel-Optionsmenü,
  3. aktiviert die ausgeblendeten Checkboxen (Inhaltsbreite, erweiterte Breite, Anordnung),
  4. schließt das Menü wieder,
  5. 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

Read the full README on GitHub →