0
votes

Since my website is using a new frontend framework, all the images are default max-width:100%; This works great since the content container force images to be the correct size. But the (awesome) Ckeditor in the background sets the image width and height when I insert an image. All the CMS users have to manualy clear this fields all the time. It's a little thing, but it start to be annoying.

I tried to reset the image height and width when inserting a value with the "setValue" function, but still the height and width gets filled in automatically.

element = dialog.getContentElement( 'info', 'txtWidth' ); if(element) element.setValue('');

It works, but get overwritten directly.

I scan through the sourcecode but it seems to be there is no option to avoid filling in the dimensions.

Do I have to rewrite the sourcecode (don't like this because of updates etc.) or does anybody know a better solution?

1
Thanks Wiktor, I read that one but thought my question was different. Due the answer of AlfonsoML I now see this is the solution.user5333087

1 Answers

1
votes

If you adjust the CKEditor settings so it uses attributes instead of inline styles for the images you won't have this problem, the image will show correctly all the time.