Advertisement

Wednesday, 15 October 2014

How to Pretty-Print Code Snippets in Blogger

By Admin  |  15:18 No comments

How to Pretty-Print Code Snippets in Blogger


Here's how I added it to my Blogger blog:


1. Click the Design tab and "Edit HTML".
2. Ctrl+F and find the </head> tag & past the below code right before the </head> tag.  JS:

<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>


3. Now, whenever you're posting, add the prettyprint class to your pre or code tags:

<pre class="prettyprint">Welcome to eBlog Up
</pre>

4. If you want use numeric style use this prettyprint class tag.
<pre class="prettyprint linenums">
</pre>




For more details on using the prettify library, see the readme

Author: Admin

Hello, I am Author, decode to know more: In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet.

0 comments:

E-mail Newsletter

Sign up now to receive breaking news and to hear what's new with us.

© 2014 e Blogup. WP themonic converted by Bloggertheme9. Powered by Blogger.
TOP