ueditor编辑器html模式下无法保存内容

用ueditor编辑文字内容时经常需要切换到html模式改一些属性,比如<img>的alt和title属性,但是在不切换到编辑模式下提交的内容无法保存,这是编辑器的BUG。

//编辑器模式切换
if(UE.getEditor("content").queryCommandState('source')!=0){
//判断编辑模式状态:0表示【源代码】HTML视图;1是【设计】视图,即可见即所得;-1表示不可用
    UE.getEditor("content").execCommand('source');
    //切换到【设计】视图
}
原文地址:https://www.cnblogs.com/Andy-Blog/p/15030253.html