WP Manifestindependent plugin directory
manifest / editor / code-block-enhancer

Code Block Enhancer

A lightweight WordPress plugin to supercharge the native Code block with headers, copy buttons, and smart wrapping. ⚡

★ 0stars
v1.0.0latest · 8mo ago

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/dhanushrs1/code-block-enhancer/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Code Block Enhancer is a lightweight WordPress plugin that supercharges the default Gutenberg core/code block. It adds essential developer-friendly features like headers, file names, copy-to-clipboard functionality, and smart line wrapping—all without replacing the native block or locking your content.

🚀 Features

  • Native Extension: Works directly with the core WordPress Code block. No new blocks to manage.
  • Zero Lock-in: Deactivate the plugin, and your code blocks revert gracefully to standard WordPress blocks. Your content remains safe.
  • Header & Filenames: Add a sleek header bar to your code snippets. Perfect for displaying filenames (e.g., style.css, app.js).
  • Copy to Clipboard: One-click copy button with visual "Copied!" feedback.
  • Smart Word Wrap:
    • Desktop: Toggle text wrapping on the fly with a dedicated "Wrap" button.
    • Smart Visibility: The "Wrap" button only appears when code lines are actually too long for the container.
    • Mobile Optimized: Horizontal scrolling for code safety, with accessible wrap controls.
  • VS Code Aesthetic: Beautiful, dark-themed styling inspired by modern IDEs (#1e1e1e background, Fira Code font stack).
  • Performance: minimal footprint. No heavy libraries. Just pure, clean JS and CSS.

📸 Screenshots

(Add screenshots of the plugin in action here)

🔧 Installation

  1. Download the plugin .zip file.
  2. Go to your WordPress Admin Dashboard -> Plugins -> Add New.
  3. Click Upload Plugin and select the zip file.
  4. Activate Code Block Enhancer.

📖 Usage

  1. Open the Block Editor (Gutenberg) and insert a standard Code block.
  2. Look at the Block Settings sidebar (Inspector).
  3. Find the Code Block Enhancer panel.
  4. Toggle Show Header to add a title bar.
  5. Enter a Header Text (e.g., "functions.php").
  6. Toggle Enable Copy Button to show the copy icon.
  7. Publish your post!

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📝 Author

Dhanush R S

📄 License

This project is licensed under the GPL-2.0+ License.

Releases

1 release.

Tag
Published
v1.0.0 latest
Jan 28, 2026 8mo ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.