Blogger Source Code Formatter

By Cui Mingda Last update Jan 20, 2009 — Installed 757 times.


Script Summary: Format source code in HTML edit mode.

Add a button in HTML Edit Mode. When you click the button, wrap selected text with the following code:

You need to modify the following CSS Styles and add them into your Blogger template.


pre.source-code {
    font-family       : Andale Mono, Lucida Console, Monaco, fixed, monospace;
    color             : #000;
    background-color  : #eee;
    font-size         : 12px;
    border            : 1px dashed #999999;
    line-height       : 14px;
    padding           : 5px;
    overflow          : auto;
    width             : 100%;
    text-indent       : 0px;
}

Statistics