百度编辑器

1、ueditor编辑器内容高度太多,怎么出现滚动条:

  在编辑器目录下的config.js文件中,修改autoHeightEnabled: false,,默认是 true 改成false 即可。

2、去掉Ueditor的提示 “本地保存成功”

      找到ueditor.all.min.js 文件
  UE.plugin.register("autosave"………………
  这个autosave就是自动保存方法。
  注释掉这个方法即可!

3、百度ueditor编辑器右键粘贴、复制不能用的解决办法:

   ueditor.config.js文件,用查找工具找到contextMenu,去掉[]里的内容,将前面的注释符号去掉,这样,在ueditor编辑器里就可以实现右键粘贴、复制、剪切了。

4、粘贴文字时:已有图片会消失 解决办法:

  ueditor.config.js文件

      ,catchRemoteImageEnable: false 

5、getContent 没有内容:

  //自定义:为视频video显示--------ueditor.config.js文件
  source: ['src', 'type'],
  embed: ['type', 'class', 'pluginspage', 'src', 'width', 'height', 'align', 'style', 'wmode', 'play',
      + 'autoplay','loop', 'menu', 'allowscriptaccess', 'allowfullscreen', 'controls', 'preload'],
  iframe: ['src', 'class', 'height', 'width', 'max-width', 'max-height', 'align', 'frameborder', 'allowfullscreen']

6、

 

正常情况下:获取编辑器内容  var content = UE.getEditor('editor').getContent();传给后台就好

      回显时:var content = "dsffdsf";   

          UE.getEditor('editor').setContent("");

          UE.getEditor('editor').execCommand( 'inserthtml', content);

猜你喜欢

转载自www.cnblogs.com/roxanneQQyxm/p/8990862.html