CSS Syntax Highlighter Like Sublime Text

CSS Syntax Highlighter Like Sublime Text
Thursday, May 21, 2020

How to Install Syntax Highlighting Like Sublime Text
Please enter the Edit HTML Blogger. Place the code below above the code </head> or &lt;/head&gt;&lt;!--<head/>--&gt;

<style type='text/css'>
/* Syntax Highlighter Sublime */
.post-body pre code, .post-body code{font-family:Consolas,Monaco,&#39;Andale Mono&#39;,monospace;font-size:100%;font-weight:normal;}
.post-body pre{padding:7px;border-radius:4px;background-color:#23241f;word-spacing:normal;word-break:normal;line-height:1.4em!important;}
  pre,pre code{white-space: pre-wrap;}
.hljs {
  display: block;
  overflow-x: auto;
  padding:0 0.5em 0.5em;
  background: #23241f;

.hljs-subst {
  color: #f8f8f2;

.hljs-emphasis {
  color: #a8a8a2;

.hljs-link {
  color: #ae81ff;

.hljs-selector-class {
  color: #a6e22e;

.hljs-strong {
  font-weight: bold;

.hljs-emphasis {
  font-style: italic;

.hljs-attr {
  color: #f92672;

.hljs-attribute {
  color: #66d9ef;

.hljs-class .hljs-title {
  color: #f8f8f2;

.hljs-template-variable {
  color: #e6db74;

.hljs-meta {
  color: #75715e;
{border-radius:2px; background:rgba(255,255,255,.2)}

Next, look for the code </body> or &lt;!--</body>--&gt;&lt;/body&gt; then add the following code above the code:

<script src='https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.14.2/highlight.min.js' type='text/javascript'/>
<script type='text/javascript'>

After that, Save the Theme.

How to use Syntax Highlighter in Blog Posts

First, place the code in the Compose tab. After that, please click the HTML tab. Then edit the code like this:


The CSS / JavaScript / PHP code is located here


Note the steps in the following image:

Then like this:

Why do you have to put the code in the Compose tab first? So that the code in the form of JavaScript, jQuery, PHP, JSON, HTML and others will be converted automatically. So you don't need HTML Converter to convert code..

Syntax Highlighter Writing Further

Now, so that Syntax Highlighter displays more specific color variations on the code, you can create a format like this:

<pre><code class="css">

CSS code here



<pre><code class="javascript">

JavaScript code here



<pre><code class="html">

HTML code here



<pre><code class="php">

PHP code here



May be useful!

  • bungfrangki.com

0 Response to "CSS Syntax Highlighter Like Sublime Text"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel