Code Monkey home page Code Monkey logo

wp-prismjs's Introduction

WP PrismJS

Loads PrimsJS on single posts for syntax highlighting.

Screenshots

Screenshot

Click to copy:

Click to copy Screenshot

Description

Included Themes:

  • Okaidia

Included Languages:

  • Markup (HTML)
  • CSS
  • PHP
  • JS
  • Markdown

Included Plugins:

  • Line Highlight
  • Copy to Clipboard Button (uses clipboard.js)

Installation

  1. Click on the Download ZIP button at the right to download the plugin
  2. Upload the entire wp-prismjs folder to the /wp-content/plugins/ directory
  3. Activate the plugin through the Plugins menu in WordPress

Usage

CSS:

<pre><code class="language-css">p { color: red }</code></pre>

HTML:

<pre><code class="language-markup"><script><h1 class="foo">Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6></script></code></pre>

PHP and Line Highlighting:

<pre data-line="9"><code class="language-php">add_filter( 'manage_media_columns', 'sk_media_columns_url' );
/**
 * Filter the Media list table columns to add a URL column.
 *
 * @param array $posts_columns Existing array of columns displayed in the Media list table.
 * @return array Amended array of columns to be displayed in the Media list table.
 */
function sk_media_columns_url( $posts_columns ) {
	$posts_columns['media_url'] = 'URL';
	return $posts_columns;
}</code></pre>

More info: http://prismjs.com/index.html

Changelog

1.0.0

  • Initial Release

Others

Tested up to: 4.7.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Donate link: https://www.paypal.me/sridharkatakam

wp-prismjs's People

Contributors

srikat avatar

Stargazers

Luís Rodrigues avatar Sérgio Santos avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.