WP Manifestindependent plugin directory
manifest / editor / rrze-codebox

RRZE CodeBox

A plugin to display code highlighting via the WordPress BlockEditor

by RRZE Webteam · github.com/rrze-webteam/rrze-codebox · website

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/rrze-webteam/rrze-codebox/archive/refs/heads/main.zip

Displays syntax-highlighted code blocks in posts and pages via a WordPress block. Highlighting runs server-side using highlight.php.

Features

  • Syntax highlighting for 13 languages (server-side, via highlight.php)
  • Light and dark theme, switchable per block
  • Optional line numbers with configurable start number
  • Syntax highlighting toggle per block
  • Language label display toggle
  • Caption with optional source URL
  • Copy-to-clipboard button (vanilla JS, no jQuery)

All configuration lives in the block's toolbar and inspector controls.

Documentation

https://www.wp.rrze.fau.de/plugins/inhaltsseiten-mit-funktionen-erweitern/rrze-codebox/.

Requirements

  • WordPress 6.8+
  • PHP 8.2+

Installation

Download the latest release from GitHub. Activate the plugin on a single site or network-activate it on Multisite.

Multisite

Fully Multisite-capable. Block attributes are stored per post.

Accessibility

Frontend output meets WCAG 2.2 AA. Both the light and dark theme provide sufficient contrast. The copy and download buttons are keyboard-operable with visible focus indicators and screen-reader labels.

License

GPLv3 or later

Development

npm run test:unit -- --runInBand
npm run test:php
npm run build

The PHP checks use the surrounding WordPress installation's parser and HTML filters without loading its database or activating plugins. For a standalone checkout, pass the WordPress root: npm run test:php -- /path/to/wordpress.

Maintainer

RRZE Webteam (webmaster@fau.de)


No external services, no cookies, no browser storage, no plugin-specific database tables or options.