您现在的位置是:帝国cms如ag真在线网投app人线上注册何实现文章内容代码高亮 >>正文
帝国cms如ag真在线网投app人线上注册何实现文章内容代码高亮
弄影团风网992人已围观
简介上传解压到网站根目录。但是没有代码高亮,在你的后台模板-内容模板-管理内容模板-文章内容模板-修改,更换百度编辑器也有点儿问题,在编辑文档时,1.下载SyntaxHighlighter.zip压缩包,...
1.下载SyntaxHighlighter.zip压缩包,可以根据个人爱好修改文件名、如果要加入html代码,代码
<link href="[!--news.url--]SyntaxHighlighter/shCoreDefault.css" rel="stylesheet" type="text/css" /><script type="text/javascript" src="[!--news.url--]SyntaxHighlighter/shCore.js"></script><script type="text/javascript"> SyntaxHighlighter.all();</script>
3、网站就用一种编程语言就行了,html代码会出错。加入
<pre class="brush:html;toolbar:false">这里是显示高亮代码html内容</pre>
也就是每次写文章的时候都要点击一下编辑器右上角的【源码】按钮
如下是所有的代码语言列表
<pre class="brush:as3;toolbar:false">ActionScript3</pre><pre class="brush:bash;toolbar:false">Bash/Shell</pre><pre class="brush:css;toolbar:false;">Css</pre><pre class="brush:cpp;toolbar:false;">C/C++</pre><pre class="brush:cf;toolbar:false">CodeFunction</pre><pre class="brush:c#;toolbar:false">C#</pre><pre class="brush:delphi;toolbar:false">Delphi</pre><pre class="brush:diff;toolbar:false">Diff</pre><pre class="brush:erlang;toolbar:false">Erlang</pre><pre class="brush:groovy;toolbar:false;">Groovy</pre><pre class="brush:html;toolbar:false">Html</pre><pre class="brush:java;toolbar:false">Java</pre><pre class="brush:jfx;toolbar:false">JavaFx</pre><pre class="brush:js;toolbar:false">javascript</pre><pre class="brush:pl;toolbar:false">perl</pre><pre class="brush:php;toolbar:false">php</pre><pre class="brush:plain;toolbar:false">plainText</pre><pre class="brush:ps;toolbar:false">PowerShell</pre><pre class="brush:python;toolbar:false">Python</pre><pre class="brush:ruby;toolbar:false">Ruby</pre><pre class="brush:scala;toolbar:false">Scala</pre><pre class="brush:sql;toolbar:false">Sql</pre><pre class="brush:vb;toolbar:false">Vb</pre><pre class="brush:xml;toolbar:false">Xml</pre>
如果嫌麻烦的话,
帝国cms如何在内容页添加代码高亮?,帝国CMS文章内容页添加代码如何高亮显示,如何让帝国cms前台代码高亮显示或变色显示,帝国cms后台文章编辑器用的是ckeditor-5,点击切换到源码,就是在文章再次
<script>var paras = document.getElementsBytagName("pre");for ( var i=0;i<paras.length;i++ ) { paras[i].setAttribute("class","brush:php;toolbar:false"); }</script>添加下面的js代码到内容页模板底部,帝国cms内容页插入代码高亮显示文件下载地址
链接: https://pan.baidu.com/s/1cG1R21trSiJI5R7gaXkUlQ?pwd=ikyg 提取码: ikyg
2、
Tags:
下一篇:CSS文本样式字体font
相关文章
个人博客html5雪花飘落代码JS特效下载
帝国cms如ag真在线网投app人线上注册何实现文章内容代码高亮如何给自己的网站/页面添加雪花代码、特效呢?有的网站配合自己的主题模板添加雪花飘落效果挺好看的。特别是与冬天季节相关的主题,很多的博客空间都加了雪花的效果。在网上搜索了几种雪花效果,做了简单的修改,在...
阅读更多
DedeCMS织梦从入门到精通建站(仿站)视频教程全集
帝国cms如ag真在线网投app人线上注册何实现文章内容代码高亮DedeCMS织梦从入门到精通建站(仿站)视频教程全集包含了dedecms建站、仿站、采集等相关知识,是目前最新版的最全面的dedecms系列视频教程。由望族良哥老师主讲,共有48节课程。对于新手用d...
阅读更多
web前端position定位层:absolute+relative应用
帝国cms如ag真在线网投app人线上注册何实现文章内容代码高亮web前端html定位层的特点:完全脱离默认文档流,独立于立体层面的Z轴之上。和float浮动一样都脱离了默认文档流。但float元素与默认文档流之间会相互产生影响,而定位层元素则完全独立互不干扰。让...
阅读更多