1,修改ckeditor的源码cofig.js文件
// 不给图片img添加style属性
config.disallowedContent='img{width,height};img[width,height]';
2,压缩静态文件
python manage.py collectstatic --noinput
python manage.py compress --force
3, 测试效果,成功
Hole yor life get everything if you never give up.
Original: https://www.cnblogs.com/1fengchen1/p/15067186.html
Author: SonnyZhang
Title: docker-ckeditor图片img标签style属性自适应
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/642843/
转载文章受原作者版权保护。转载请注明原作者出处!