百度编辑器代码如何高亮
在需要高亮的页面尾部加入高亮代码就可以了
<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;
具体行间距自己设置
- Python在线编程编辑器工具源码 [2023-07-23]
- 帝国CMS编辑器IE10不显示解决方法 [2022-12-30]
- 网页版HTML在线编辑器源码 [2022-10-20]
- ueditor百度编辑器路径加载错误解决方法 [2022-10-13]
- Hosts文件编辑器V22.10.11.03 [2022-10-11]