PHP ueditor 的代码高亮

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
<title>新建H5模板</title>
<link rel="stylesheet" href="css/base.css" />
<!--高亮的代码 begin-->
<link rel="stylesheet" href="third-party/SyntaxHighlighter/shCoreDefault.css"  />
<script src="third-party/SyntaxHighlighter/shCore.js"></script>
<script>
	SyntaxHighlighter.all();
</script>
<!--高亮的代码 end-->
</head>
<body>
<h3>
	<p>
    HTML内容的开始
</p>
<pre class="brush:html;toolbar:false">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset=&quot;UTF-8&quot;&gt;
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no&quot;&gt;
&lt;title&gt;新建H5模板&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
    body{ font-family:\5FAE\8F6F\96C5\9ED1,&#39;Arial&#39;; color:#5b5b5b; background-color:#fff; font-size:14px; overflow-x:hidden;}
    a{ color:#333; text-decoration:none;}
    a:hover{ color:#333; text-decoration:none;}
    img{ border:none;}
    i,em{ font-style:normal;}
    li{ list-style-type:none;}
    textarea{ resize:vertical;}
    input, select, textarea{ font-family:\5FAE\8F6F\96C5\9ED1,&#39;Arial&#39;; background-color:#fff margin:0; padding:0; outline:none;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;h3&gt;阅谁问君诵,水落清香浮&lt;/h3&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
        alert(&quot;测试吧&quot;);
    &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>
    HTML内容的结束<br/>
</p>
</h3>
</body>
</html>

效果图:
PHP ueditor 的代码高亮
 

相关推荐