WP Manifestindependent plugin directory
manifest / editor / wp-code-beautifier-block

Code Beautifier Block

WordPress block for code with server-side syntax highlighting that stays inside the layout: long lines and unbroken strings wrap or scroll inside the block, never the page.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/lw-it-solutions/wp-code-beautifier-block/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A WordPress block for code that stays inside the layout. Highlighting happens on the server, long lines wrap or scroll inside the block, and unbroken strings such as URLs, hashes or base64 never push the page sideways.

  • Server-side syntax highlighting for 20 languages, plus automatic detection
  • Never wider than the content column, also in flex and grid layouts (contain: inline-size)
  • Wrap mode breaks long strings at any character; readers can switch to horizontal scrolling per block
  • Copy button (line numbers are never copied), optional file name, start number and highlighted lines
  • Light and dark colours that follow the system setting or a data-theme attribute; every colour is a CSS custom property
  • Readable fallback: the post content keeps a plain <pre><code> copy of the code
  • Transforms from the Code, Preformatted and Code Block Pro blocks
  • No options, no cookies, no external requests

Requires WordPress 6.5 and PHP 7.4. Details in readme.txt.

Dark mode with line numbers and highlighted lines

License

GPL-2.0-or-later, see LICENSE.