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

      

  • 相关阅读:
    linux 解压命令
    在xampp集成环境下使用 thinkphp 连接oracle
    输入框实现新闻列表分页显示(一)
    MyEclipse获取注册码
    Oracle数据库创建表空间
    SQL Server之存储过程
    连接Oracle数据库帮助类
    Oracle数据库的导入和导出
    创建dml触发器
    java连接数据库步骤
  • 原文地址:https://www.cnblogs.com/qing1304197382/p/14653327.html
Copyright © 2011-2022 走看看