Implementation of code highlighting in Web pages with imitation csnd

Source: Internet
Author: User

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

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.