• 微信号:Zh-y9213
您当前的位置:爱资源分享网 > > 网站源码 > 网站运营

百度编辑器代码高亮代码

栏目:网站运营时间:2022-06-22 11:09阅读数:94人阅读

百度编辑器代码如何高亮

在需要高亮的页面尾部加入高亮代码就可以了

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

百度编辑器代码自动换行

找到高亮代码显示的css文件  ueditor/third-party/SyntaxHighlighter/shCoreDefault.css文件

查找

.syntaxhighlighter{width:100%!important;margin:.3em 0 .3em 0!important;position:relative!important;overflow:auto!important;background-color:#f5f5f5!important;border:1px solid #ccc!important;

替换成

.syntaxhighlighter{width:100%!important;margin:.3em 0 .3em 0!important;position:relative!important;overflow:auto!important;background-color:#f5f5f5!important;border:1px solid #ccc!important;word-break:break-all;

主要是加了word-break:break-all;这个CSS自动换行样式属性。

百度编辑器代码行间距

找到高亮代码显示的css文件  ueditor/third-party/SyntaxHighlighter/shCoreDefault.css文件

查找

line-height:1.1em!important;

替换成

line-height:25px!important;

具体行间距自己设置


资源均来自第三方,谨慎下载,前往第三方网站下载

本站所有文章、数据、图片均来自互联网,一切版权均归源网站或源作者所有。

如果侵犯了你的权益请来信告知我们删除。邮箱:737597453@qq.com