找回密码
 立即注册
搜索
热搜: 活动 交友 discuz

百度富文本自定义上传

[复制链接]
发表于 2022-9-28 19:22:14 | 显示全部楼层 |阅读模式
  1. UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
  2.         UE.Editor.prototype.getActionUrl = function (action) {
  3.                 if (action == 'uploadimage' || action == 'uploadscrawl') {
  4.                         return "/baiduupload/file_upload_ueditor";//这就是自定义的上传地址
  5.                 } else if (action == 'uploadvideo') {
  6.                         return '';
  7.                 } else {
  8.                         return this._bkGetActionUrl.call(this, action);
  9.                 }
  10.         }

  11.         var ue = UE.getEditor('content', {
  12.                 zIndex: 999,
  13.                 initialFrameWidth: "100%", //初化宽度
  14.                 initialFrameHeight: 300, //初化高度
  15.                 focus: false, //初始化时,是否让编辑器获得焦点true或false
  16.                 maximumWords: 99999, removeFormatAttributes: 'class,style,lang,width,height,align,hspace,valign',//允许的最大字符数 'fullscreen',
  17.                 pasteplain: false, //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
  18.                 autoHeightEnabled: true
  19.         });
复制代码


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|知识在线

GMT+8, 2026-11-2 17:58 , Processed in 0.145558 second(s), 21 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表