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

by Dhanush R S · github.com/dhanushrs1/code-block-enhancer · 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/dhanushrs1/code-block-enhancer/archive/refs/heads/master.zip

Readme

Code Block Enhancer

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.

Read the full README on GitHub →

Releases

TagPublished
v1.0.0 Jan 28, 2026

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