当前位置:网站首页>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);
}
边栏推荐
- Equivalent change of resistance circuit (Ⅱ)
- Doget and dopost
- Differences between cookies, cookies and sessions
- 乐观锁悲观锁适用场景
- MySQL intent lock
- 百度富文本编辑器UEditor 图片宽度100%自适应,手机端
- Communication between processes (pipeline details)
- C# 音乐
- 如何构建面向海量数据、高实时要求的企业级OLAP数据引擎?
- [image hiding] digital image watermarking method technology based on hybrid dwt-hd-svd with matlab code
猜你喜欢

【图像隐藏】基于混合 DWT-HD-SVD 的数字图像水印方法技术附matlab代码

Win11桌面切换快捷键是什么?Win11快速切换桌面的方法

Today, I went to oppo for an interview and was asked numbly

吴恩达逻辑回归2

Upgrade esxi6.7.0 to 7.0u3f (updated on July 12, 2022)

Analysis and solution of data and clock mismatch delay in SPI transmission

Equivalent change of resistance circuit (Ⅱ)

TypeError: Unrecognized value type: <class ‘str‘> ParserError: Unknown string format

测试驱动开发(TDD)在线练功房 | 9月17日开课

0x80131500打不开微软商店的解决办法
随机推荐
如何构建面向海量数据、高实时要求的企业级OLAP数据引擎?
mysql 查看是否锁表
Is the win11 dynamic tile gone? Method of restoring dynamic tile in Win 11
Gap Locks(间隙锁)
Implementation of recommendation system collaborative filtering in spark
Recommended collection, which is probably the most comprehensive coding method summary of category type features
Understanding service governance in distributed development
MySQL tutorial 68-as setting alias
80篇国产数据库实操文档汇总(含TiDB、达梦、openGauss等)
doGet与doPost
Exclusive lock
Analysis and solution of data and clock mismatch delay in SPI transmission
优必选大型仿人服务机器人Walker X的核心技术突破
Win11自带画图软件怎么显示标尺?
Product upgrade observation station in June
Verifiable random function VRF
Use huggingface to quickly load pre training models and datasets in moment pool cloud
Typescript learning 2 - Interface
MySQL check whether the table is locked
Pagehelper.startpage is not effective