CKEDITOR - prevent adding image dimensions as a css style

后端 未结 7 1484
独厮守ぢ
独厮守ぢ 2020-12-14 06:21

How to prevent CKEDITOR from adding image dimensions as a style?

Instead of this:


         


        
7条回答
  •  旧巷少年郎
    2020-12-14 06:46

    I do not believe you can do it without altering the image plugin file of the CKEDITOR..

    If you search their bug tracking site, you will see that they try to 'avoid XHTML deprecated attributes' in favor of styling. ( Avoid deprecated image attributes )

    The place to look if you want to do it yourself (by altering the source files) is this file : plugins_image_dialogs_image.js You will see in there that they specifically remove the attribute and add the style equivalent.

提交回复
热议问题