UEditor图片居中问题
2017-04-08 12:19
232 查看
在图片上传中,当点击图片居中时,富文本编辑框是居中,但是这个居中是UEditor用绝对定位居中的,并不是用margin-left:auto和margin-right:auto,使图片居中。
这个需要修改两个地方,一个是
ueditor.config.js
// xss 过滤是否开启,inserthtml等操作
, xssFilterRules: false
//input xss过滤
, inputXssFilter: false
//output xss过滤
, outputXssFilter: false
ueditor.all.js
大约在11008行,添加
pN = img.parentNode;
domUtils.setStyle(img, 'float', '');
domUtils.removeAttributes(img, 'align');
img.style.marginLeft = "auto";
img.style.marginRight = "auto";
tmpNode = img;
这个需要修改两个地方,一个是
ueditor.config.js
// xss 过滤是否开启,inserthtml等操作
, xssFilterRules: false
//input xss过滤
, inputXssFilter: false
//output xss过滤
, outputXssFilter: false
ueditor.all.js
大约在11008行,添加
pN = img.parentNode;
domUtils.setStyle(img, 'float', '');
domUtils.removeAttributes(img, 'align');
img.style.marginLeft = "auto";
img.style.marginRight = "auto";
tmpNode = img;
相关文章推荐
- UEditor图片不能居中,首行缩进无效等问题的解决
- 百度ueditor 视频编辑问题以及图片跟视频居中报错问题解决
- 百度ueditor 视频编辑问题以及图片跟视频居中报错问题解决
- UIImageView的图片居中问题
- ueditor在struts2下图片上传问题
- 图片的居中、拉伸与平铺 - 回复 "我是一只想飞的小小鸟" 的问题
- 讨论了好久的问题,IE、Firefox下CSS图片垂直居中的问题
- div+css的图片居中的问题
- CSS 图片+文字,文字垂直居中问题
- 文字与图片在同一行垂直居中问题
- CSS图片垂直居中方法整理集合 !(常见问题解答)
- ueditor图片上传失败问题
- 未知大小图片在已知容器中的垂直和水平居中问题
- ASP.NET MVC ueditor图片上传失败问题
- 文字与图片在同一行垂直居中问题
- 用canvas画的图片跟在图片上写字居中的问题?
- 分享单行图片文字垂直居中问题小技巧
- 未知大小图片在容器的垂直和水平居中问题
- Jsp中怎样让图片在div中居中问题小结
- [推荐] CSS图片垂直居中方法整理集合 !(常见问题解答)