当前位置:网站首页>Baidu rich text editor ueeditor image width 100% adaptive, mobile terminal
Baidu rich text editor ueeditor image width 100% adaptive, mobile terminal
2022-07-25 16:22:00 【Bitter summer Bluegrass】
Sometimes the pictures of rich text editor are displayed beyond , No automatic 100%
modify ueditor.all.js Of 23774 That's ok ( about , not always ) and 24533( about , not always ), Search if you can't
add to the content
loader.setAttribute('width','100%');// Image width 100%
loader.setAttribute('height','auto');// Picture height auto
23774 That's ok
loadingHtml = '<img class="loadingclass" id="' + loadingId + '" src="' +
me.options.themePath + me.options.theme +
'/images/spacer.gif" title="' + (me.getLang('autoupload.loading') || '') + '" >';
successHandler = function(data) {
var link = urlPrefix + data.url,
loader = me.document.getElementById(loadingId);
if (loader) {
loader.setAttribute('src', link);
loader.setAttribute('_src', link);
loader.setAttribute('title', data.title || '');
loader.setAttribute('alt', data.original || '');
loader.setAttribute('width','100%');// Image width 100%
loader.setAttribute('height','auto');// Picture height auto
loader.removeAttribute('id');
domUtils.removeClasses(loader, 'loadingclass');
}
};
24533 That's ok
if(json.state == 'SUCCESS' && json.url) {
loader = me.document.getElementById(loadingId);
loader.setAttribute('src', link);
loader.setAttribute('_src', link);
loader.setAttribute('title', json.title || '');
loader.setAttribute('alt', json.original || '');
loader.setAttribute('width','100%');// Image width 100%
loader.setAttribute('height','auto');// Picture height auto
loader.removeAttribute('id');
domUtils.removeClasses(loader, 'loadingclass');
} else {
showErrorLoader && showErrorLoader(json.state);
}
边栏推荐
- MySQL check whether the table is locked
- Sum arrays with recursion
- Upgrade esxi6.7.0 to 7.0u3f (updated on July 12, 2022)
- [JS advanced] JS regular correlation functions and regular objects_ 02
- MySQL tutorial 65 data in MySQL operation table
- What is the shortcut key for win11 Desktop Switching? Win11 fast desktop switching method
- Equivalent change of resistance circuit (Ⅱ)
- MySQL self incrementing lock
- Cookie、cookie与session区别
- Boomi荣获“多元化最佳首席执行官奖”和“职业成长最佳公司奖”,在大型公司类别中跻身50强
猜你喜欢

How does win11's own drawing software display the ruler?
![[wechat applet] detailed explanation of applet host environment](/img/57/582c07f6e6443f9f139fb1af225ea4.png)
[wechat applet] detailed explanation of applet host environment

如何构建面向海量数据、高实时要求的企业级OLAP数据引擎?

哪个led显示屏厂家更好

Visual studio 2022 view class diagram

一文理解分布式开发中的服务治理

Sum arrays with recursion

Food safety - do you really understand the ubiquitous frozen food?

Communication between processes (pipeline details)

Win11自带画图软件怎么显示标尺?
随机推荐
MYSQL导入sqllite表格的两种方法
EMQX Cloud 更新:日志分析增加更多参数,监控运维更省心
linux内核源码分析之页表缓存
Mysql读写锁
MyBaits
Analysis and solution of data and clock mismatch delay in SPI transmission
邮件的收发的展现逻辑之收件箱发件箱以及回复断链的问题
吴恩达逻辑回归2
fastadmin tp 安装使用百度富文本编辑器UEditor
Sum arrays with recursion
I interviewed 8 companies and got 5 offers in a week. Share my experience
The presentation logic of mail sending and receiving inbox outbox and reply to the problem of broken chain
今天去 OPPO 面试,被问麻了
如何构建面向海量数据、高实时要求的企业级OLAP数据引擎?
Simple rotation map and hamster beating
Save the image with gaussdb (for redis), and the recommended business can easily reduce the cost by 60%
MySQL全局锁
百度富文本编辑器UEditor 图片宽度100%自适应,手机端
Shared lock
Visual studio 2022 view class diagram