ueditor编辑器前台html代码宽度不随页面自适应
将dedecms更换为ueditor编辑器后发现在后台插入html代码后前台显示代码区域的宽度超过网页设定的宽度,如下图:这是因为在前台引用的代码高亮CSS内缺少一个样式,查找include/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;border-radius:4px!important;border-collapse:separate!important}将width:100%!important样式去掉,添加如下样式:word-break:break-all!important;这样就可以了,调整后如下图显示:
页:
[1]