ueditor编译器

1.官方demo没有说明点击确定事件如何在html执行。添加上面的dialog.onok事件

2.如果不想使用工具栏的icon样式,可以再修改

ueditor\themes\default\images\icons.png和icons.gif

再使用background-position定位;

![](https://img2018.cnblogs.com/blog/1649544/202002/1649544-20200225110922653-1125202903.png) ![](https://img2018.cnblogs.com/blog/1649544/202002/1649544-20200225110958999-909372436.png)

3.最后一步记得在你使用ueditor编辑器的页面引入这个js文件。他会自动在你的工具栏添加你自定义Dialog

这个是ueditor的帮助文档:http://fex.baidu.com/ueditor/

``` myeditor = UE.getEditor("dialogUeditor",{ initialContent: "",//初始化编辑器的内容 elementPathEnabled:false,//[默认值:true] 是否启用元素路径,默认是显示 wordCount:false, //[默认值:true] 是否开启字数统计 enableAutoSave:false, //[默认值:true] 启用自动保存 initialFrameWidth : 700, //[默认值:1000] 初始化编辑器宽度,默认1000 initialFrameHeight : 300 //[默认值:320] 初始化编辑器高度,默认320 }); ``` ![](https://img2018.cnblogs.com/blog/1649544/202002/1649544-20200225153801627-1027374184.png)

editor.focus([toEnd]) //默认focus到编辑器头部,toEnd为true时focus到内容尾部,让编辑器获得焦点,toEnd确定focus位置

通 getContent 和 setContent 方法可以设置和读取编辑器的内容

posted @ 2020-02-25 11:12  whjykgz  阅读(136)  评论(0编辑  收藏  举报