if you're developer and want to share your code on your blog with some highlight on it, you can use syntaxhighlighter. To use the syntaxhighlighter, follow these step below:
1. Backup your current template : go to template menu → backup/restore → download full template
2. import the plugin : go to edit html, search then paste these code above it:
1 2 3 4 5 6 7 8 9 10 | < link href = "https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/styles/shCore.min.css" rel = "stylesheet" type = "text/css" > < link href = "https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/styles/shThemeDefault.min.css" rel = "stylesheet" type = "text/css" > < script src = "https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shCore.min.js" type = "text/javascript" > < script src = 'https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushCss.min.js' type = 'text/javascript' /> < script src = 'https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushJScript.min.js' type = 'text/javascript' /> < script src = 'https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushPhp.min.js' type = 'text/javascript' /> < script src = 'https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushXml.min.js' type = 'text/javascript' /> < script language = 'javascript' > SyntaxHighlighter.all(); </ script > |
cdnjs SyntaxHighlighter
3. post your code between:
1 2 | < pre class = "brush: js" >########### your code ########### </ pre > |
1 2 3 4 5 | < pre class = "brush: js" > var name="john"; function sayHello(){ alert("Hello ,"+name); } </ pre > |
1 2 3 4 | var name= "john" ; function sayHello(){ alert( "Hello ," +name); } |