zoukankan      html  css  js  c++  java
  • 百度编辑器使用笔记

    1、编辑器配置

    var ue = UE.getEditor('editor-container', {
    toolbars: [
    ['undo', 'redo','|','bold','italic','underline','strikethrough','forecolor','|','lineheight','fontsize','fontfamily','insertcode'],
    ['justifyleft','justifyright','justifycenter','justifyjustify','|','insertorderedlist','insertunorderedlist','|','blockquote','horizontal',
    'removeformat','formatmatch','|','link','insertimage','insertvideo',]
    ],
    autoHeightEnabled: true,//自动加高
    autoFloatEnabled: true,//自动浮动
    topOffset:32,//浮动时工具栏距离浏览器顶部的高度
    elementPathEnabled : false, //是否启用元素路径,默认是true显示
    wordCount:false ,//是否开启字数统计
    allowDivTransToP: false,//阻止div标签自动转换为p标签
    catchRemoteImageEnable:false,//抓取远程图片是否开启,默认true
    });
    

    2、设置默认

    ue.ready(function(){
    	ue.execCommand('fontfamily','arial');   //字体
    	ue.execCommand('lineheight', 1);          //行间距
    	ue.execCommand('fontsize', '16px');       //字号
    });
    

    3、UEditor编辑器如何关闭抓取远程图片本地化功能

      问题:直接复制粘贴内容的时候,编辑器会默认将图片本地化并返回本地化的src

      解决方法:catchRemoteImageEnable:false,//抓取远程图片是否开启,默认true

    4、一个优秀的二次开发编辑器https://github.com/FaeryQuest/wxEditor

      

  • 相关阅读:
    ubuntu用apt-get安装memcache
    Vagrant error: Your VM has become inaccessible.
    PHP数据类型转换
    vim 树形目录插件NERDTree安装及简单用法
    mysql 导入sql文件,source命令
    linux:vi 替换命令
    svn更改分支名字,move命令
    Subversion命令汇总
    不解压直接查看tar包内容
    ls按时间排序输出文件列表
  • 原文地址:https://www.cnblogs.com/qing1304197382/p/14653327.html
Copyright © 2011-2022 走看看