About the use of syntaxhighlighter 3.0.83 download Syntaxhighlighter
Can be downloaded to the official website
on page Introduction
- Introducing Shcore.js and SHCORE.CSS
- Add a JS file that supports the appropriate language
What languages are needed to support the introduction of the language corresponding to the JS file
- Introduction of SHTHEMEDEFAULT.CSS
- Place code that needs highlighting in
<pre />
or <script /
>
- Calling
SyntaxHighlighter.all()
methods
Instance
The procedure is as follows:
<meta charset="Utf-8"><link type="text/css" rel="stylesheet" href ="Styles/shcore.css"/><link type="text/css" rel="stylesheet" href=" Styles/shcoredefault.css "/><script type="text/javascript" src="Scripts/shcore.js" ></script><script type="text/javascript" src="Scripts/shbrushphp.js " ></script></script><script type="Text/javascript">Syntaxhighlighter.all ();</script><H1>Test</H1><pre class="brush:php;" >/** * * @author DeQuan */Class person{public Function say () {echo ' Hello World '; } }</pre>
Effects such as
To modify code.js files by consolidating syntaxhighlighter into Kindeditor in Onethink
Comment out 48 lines and change to 49 lines
Add Syntaxhighlighter required CSS and JS files to the corresponding reality view
Test
Front-end Preview (http://www.findme.wang/index.php?s=/Blog/detail/id/20.html)
Okey.
Implementation of code highlighting in Web pages with imitation csnd