Kindeditor Editor Consolidated Syntaxhighlighter Code highlighting

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.