Advertise

Monday, 10 September 2012

Regex Colorizer - syntax highlighter

Source from Regex Colorizer

apply to blogger

  1. go to "Template tab" -> click "Edit html"
  2. find </head>
  3. add below code to above </head>
  4. <!---start regex-colorizer.js-->
    <script src='http://stevenlevithan.com/regex/colorizer/regex-colorizer.js' type='text/javascript'/>
    <link href='http://stevenlevithan.com/regex/colorizer/themes/nobg.css' rel='stylesheet' type='text/css'/>
    <!---end regex-colorizer.js-->
    
  5. find <body> repleace <body> with :
  6. <body onload='RegexColorizer.colorizeAll()'>
  7. when you want to highlight some code
  8. <pre class="regex"> you some code </pre>
    

Demo

View:
  • click result tab to see highligher effect
  • click html tab to see html code
  • click source tab to see source

0 comments:

Post a Comment