Skip to content

humayunahmed8/wp-code-highlighter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WP Code Highlighter

Loads highlight.js and clipboard.js on single pages in WordPress for syntax highlighting with a 1-click copy to clipboard button.

Screenshot

Included Theme:

  • GitHub Dark Dimmed

Included Languages:

  • HTML, XML
  • CSS
  • PHP
  • JavaScript
  • JSON
  • Markdown
  • Plain text
  • SCSS

Installation

  1. Click on the Download ZIP button at the right to download the plugin.

  2. Upload the entire wp-highlightjs folder to the /wp-content/plugins/ directory.

  3. Activate the plugin through the Plugins menu in WordPress.

Usage

In WordPress' Gutenberg editor, type / to begin typing code and hit return when you see a match.

Paste your code.

If using Oxygen, wrap your code in a code element and that in a pre element having a class of wp-block-code.

Ensure that there are no spaces between the HTML tags.

Screenshot.

Changelog

1.0.0 - October 21, 2023

  • Initial Release

Others

Tested up to: 6.3.2

License: GPLv2 or later

License URI: http://www.gnu.org/licenses/gpl-2.0.html

Releases

No releases published

Packages

No packages published