- Posts Tagged ‘prismjs’

PrismJs Syntax Highlighter Supported Languages

Every time find it difficult to know which languages are supported in PrismJs Syntax Highlighter. There are two ways to know which languages are supported. One way to know is by visiting to this download link. Another method of knowing supported languages is by checking in your download prism.js file.… (Continue)

JavaScript: Select All Content of any HTML Element

This post is about selecting HTML content of any Element on the document. I need a way to select all content inside <pre></pre>, so that user can copy all code inside it. (function() { function selectText(element) { var doc = document , text = element , range, selection ; if… (Continue)

WordPress Plugin for Escaping Markup for Prism Syntax Highlighter

Just a small announcement that a WordPress plugin has been committed for Prism Syntax Highlighter. I liked the plugin as it is really lightweight and fast. The new plugin will allow you to post markup without manually changing the code to post online. What is required is just installation and… (Continue)

A Lightweight JavaScript Syntax Highlighter – Prism

Prism is a lightweight and fast JavaScript based Syntax Highlighter. It is written based on HTML5 standard. It uses <code class="language-xxxx"></code> for posting code. Before <code>, it needs <pre>. Pre tag is required for backward compatibility. We should use <pre> as wherever JavaScript does not work, <pre> will work and… (Continue)