I'm using the kindeditor-4.1.5 version.
Link Address: Http://kindeditor.googlecode.com/files/kindeditor-4.1.5.zip
Syntaxhighlighter code highlighting the plugin can be found on the Internet
Steps:
1. Locate the Kindeditor code plug-in's Code.js file (under Editor/plugins/code) and then delete or comment out the two lines
The code is as follows |
Copy Code |
CLS = Type = = ""? "": "lang-" + type,
html = "<pre class=" Prettyprint "+ CLS +" "> "+ K.escape (code) +" </pre> ";
Modified to:
CLS = Type = = ""? "": Type, html = "<pre class=" brush: "+ CLS +" "> "+ K.escape (code) +" </pre> "; |
Find demo.php in the Kindeditorphpcode directory
Open the Insert code, if you do not need the language you can go to syntaxhighlighter/scripts/this directory to find the language you need to join
The code is as follows |
Copy Code |
<script type= "Text/javascript" src= ". /syntaxhighlighter/scripts/shcore.js "></script> <script type= "Text/javascript" src= ". /syntaxhighlighter/scripts/shbrushphp.js "></script> <script type= "Text/javascript" src= ". /syntaxhighlighter/scripts/shbrushjscript.js "></script> <script type= "Text/javascript" src= ". /syntaxhighlighter/scripts/shbrushcss.js "></script> <script type= "Text/javascript" src= ". /syntaxhighlighter/scripts/shbrushsql.js "></script> <script type= "Text/javascript" src= ". /syntaxhighlighter/scripts/shbrushxml.js "></script> <link type= "Text/css" rel= stylesheet "href=". /syntaxhighlighter/styles/shcoredefault.css "/> |
The solution is to use the Kindeditor plug-in to make the inserted code highlight Syntaxhighlighter, but the code is too long to wrap.