This time I will share jQuery Plugin and tutorial about Notepad++ Style Syntax highlighting Plugin With jQuery – syntaxPP, hope it will help you in programming stack.
syntaxPP is a very small jQuery based code syntax highlighter that display your source code in different colors as you seen in the famous Notepad++ application.
How to use it:
1. Load the latest jQuery library together with the jQuery syntaxPP plugin’s JS and CSS files in the document.
1 |
< link href = "syntaxPP.css" rel = "stylesheet" > |
3 |
< script src = "syntaxPP.jquery.js" ></ script > |
2. Add your code snippets into the pre
code
tags.
3. Call the function on the code
tag and done.
1 |
$( 'pre code' ).syntaxPP(); |
4. Specify the file name displayed in the header tab.
1 |
$( 'pre code' ).syntaxPP({ |
This awesome jQuery plugin is developed by Dotcodes. For more Advanced Usages, please check the demo page or visit the official website.