百度编辑器ueditor 的一些设置
1、是否抓取远程图片:ueditor.config.js 中:catchRemoteImageEnable:false
2、DIV标签是否转换成P标签:'allowDivTransToP': false,
3、设置默认字体等样式:\ueditor\themes\iframe.css
/*可以在这里添加你自己的css*/
body{margin:8px;font-family:'宋体'!important;font-size:16px!important;line-height:160%!important;}
4、设置编辑器的默认显示功能,和宽度高度:
<script type="text/javascript">
var ue = new UE.ui.Editor({
toolbars: [['fullscreen', 'undo', 'redo', '|', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|', 'rowspacingtop', 'rowspacingbottom', 'lineheight', '|','customstyle', 'paragraph', 'fontfamily', 'fontsize', ]], textarea: "T_Content", initialFrameHeight: 220, initialFrameWidth: 560
});
ue.render("T_Content");
//var ue = new UE.ui.Editor({ textarea: "T_Content", initialFrameHeight: 220, initialFrameWidth: 560 });
//ue.render("T_Content");
</script>
5、设置完这些信息之后刷新页面可能编辑器不会显示你设置后的样式等信息,需要清空一下浏览量缓存才可以。

浙公网安备 33010602011771号