Blogger Information
Blog 16
fans 0
comment 0
visits 18215
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
百度编辑器ueditor代码高亮效果前台不显示的解决方法
忧郁之子的博客
Original
1092 people have browsed it

百度ueditor是一款非常不错的富文本编辑器,在国内很多公司都在使用,当我们在发表文章添加内容时,有时需要在内容中编写类似于php、javascript等语言代码,那么本篇就教大家怎么使用ueditor的代码高亮:

首先在文章页面head部分引入js、css文件如下,具体路径根据自己的编写   

<script src="ueditor/third-party/SyntaxHighlighter/shCore.js"></script>
<link rel="stylesheet" href="ueditor/third-party/SyntaxHighlighter/shCoreDefault.css">
<script type="text/javascript">
   SyntaxHighlighter.all();
</script>

添加语言时,在代码语言处可以选择您需要的语言

自行调整自己实际项目中的路径即可;


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post