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

      

  • 相关阅读:
    控件属性大全(持续更新)
    STM32F0使用LL库实现UART接收
    STM32F0 LL库IIC第二地址配置错误
    C# 抽象类小谈
    DevExpress 动态换肤
    DevExpress ChartControl大数据加载时有哪些性能优化方法
    Devexpress WPF ChartControl 多Y轴
    Lambda表达式的使用
    Prism--MVVM 之Command
    WPF Toolkit Chart--动态换列
  • 原文地址:https://www.cnblogs.com/qing1304197382/p/14653327.html
Copyright © 2011-2022 走看看