• About
  • Sitemap
  • Privacy Policy
  • Disclaimer
  • Contact
Download Tutorial Gratis ( Photoshop, Corel Draw, Blog, SEO, Desain Grafis, Template )
  • Home
  • Tutorial
    • Submenu1
    • Submenu2
  • Desain Grafis
  • Template
  • Contoh Undangan
  • Sitemap
  • SEO
  • Blog
  • Photoshop
  • Corel Draw

Home » Tutorial Blog » How to Add Syntax Highlighter(v3) to Blogger Blogs

How to Add Syntax Highlighter(v3) to Blogger Blogs

How to Add Syntax Highlighter(New Version) to Blogger Blogs
Syntax Highlighter version 3 is a powerful JavaScript tool to display and highlight your scripts and codes in blogger posts. In my previous post there is only a section for showing your codes. But in this tool we display in special section with highlighted script tags.

now i am showing a HTML Page Script here with this tool
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>HTML Code Example</title>
</head>
<body>
    <h1>HTML Code Example</h1>
  
    <p>Hello World !</p>
  
    <p>This line is Sample line.</p>
  
    <div class="foobar">
        This    is  an
        example of  smart
        tabs.
    </div>
  
    <p><a href="http://www.way2blogging.org/">Way2Blogging</a></p>
</body>
</html>

It is easy to setup and highly customized feathers you can use with this tool
   a. Installing Scripts
   b. Usage

Watch live Demo for Themes Here

How to Install Syntax Highlighter in Blogger?

Here is simple form to generate your Syntax Highlighter code
1. first select a theme of your highlighter
2. Select Brushes that you want to highlight (Ex:- JavaScript, HTML, PHP ...)
3. Click on "Get Code" button to generate your code
4. Copy the Entire code and paste it before </head> tag in your template



You successfully Installed Scripts on Blogger template!

Now How to Use this on Blogger Post
You want to display scripts and codes on blogger post
1. Put your Script or Code inside the PRE tags and define class with brush name.
<pre class='brush:[brushname];'>

<!--Put Your Code Here (must be HTML escaped)-->

</pre>
2. Make sure your Script or Code must be HTML escaped, eg. all < must be replaced with &lt; This will ensure correct rendering. There are several tools to convert Your code !
      i. Encode / Decode HTML Entities
      ii. Postable

For suppose i am showing a JavaScript code.
i am defined a <pre></pre> tags, and defined a class <pre class=''></pre> and gave a brush name as <pre class='brush:js;'></pre>
finally i paste converted code inside this tags

finally my code is like
<pre class='brush:js;'>
&lt;script type=&quot;text/javascript&quot;&gt;
    var d = new Date();
    var time = d.getHours();

    if (time &lt; 10) {
        document.write(&quot;&lt;b&gt;Good morning&lt;/b&gt;&quot;);
    } else {
        document.write(&quot;&lt;b&gt;Good day&lt;/b&gt;&quot;);
    }
&lt;/script&gt;
</pre>
it results like this
?
1
2
3
4
5
6
7
8
9
10
<script type="text/javascript">
    var d = new Date();
    var time = d.getHours();
 
    if (time < 10) {
        document.write("<b>Good morning</b>");
    } else {
        document.write("<b>Good day</b>");
    }
</script>


Posted by Unknown on Saturday, July 30, 2011 - Rating: 4.5
Title : How to Add Syntax Highlighter(v3) to Blogger Blogs
Description : Syntax Highlighter version 3 is a powerful JavaScript tool to display and highlight your scripts and codes in blogger posts. In my previou...

Share to

Facebook Google+ Twitter

0 Response to "How to Add Syntax Highlighter(v3) to Blogger Blogs"

Post a Comment

Newer Post
Older Post
Home
Subscribe to: Post Comments (Atom)

Popular Posts

  • FORMAT CONTOH UNDANGAN (doc)
    Kali ini saya mencoba membuat link download berupa beberapa contoh undangan yang sering dibikin untuk acara-acara tertentu, misalnya tah...
  • Download Film Semi Gratis | Film Semi Indonesia
    Download Film Semi Gratis lainnya Di : 1. andrianacom.blogspot.com 2. sh3hack3r.blogspot.com Movie Synopsis Starting in Jakarta in...
  • Add Social Sharing/Bookmarking Widget with Cool Hover Effect
    Social sharing / bookmarking widget with Cool Gray-scale/Color hover widget to Blogger blog. i have given a beautiful sharing widget with c...
  • PreWedding dengan Efek Foto Sephia
    Pada tutorial ilmuGrafis kali ini kita akan belajar membuat efek Photo Sephia . Maaf ini buka sephia judul lagunya Sheila On7 tapi maksunya ...
  • Spooky HDR Effect
    OK Brader en Sister sudah lama saya tidak berkontribusi di Web kesayangan saya ini... :D . Pada Efek Photo dengan Photoshop kali ini s...

Labels

CONTOH UNDANGAN (doc) Desaign grafis Hardware and Software News PLUGIN PHOTOSHOP FREE Search Engine Optimization SEO SEO BLOG skripsi Software Desain Grafis Template Tips and trick Tips Komputer Tips Software Tutorial Blog Tutorial Corel Tutorial Photoshop Tutorial PHOTOSHOP GRATIS Tutorial SEO

Site Info

Copyright © 2012 Download Tutorial Gratis ( Photoshop, Corel Draw, Blog, SEO, Desain Grafis, Template ) - All Rights Reserved
Design by Mas Sugeng - Powered by Blogger