CKEDITOR - prevent adding image dimensions as a css style
问题 How to prevent CKEDITOR from adding image dimensions as a style? Instead of this: <img src="image.jpg" style="height:100px; width:100px;"> I want this <img src="image.jpg" height="100px" width="100px"> 回答1: There is one more way to do this (much simpler), by using Disallowed Content introduced in CKEditor 4.4.0: CKEDITOR.replace( 'editor1', { disallowedContent : 'img{width,height}' } ); or in config.js: config.disallowedContent = 'img{width,height}'; This rule will disallow inline styles