Search code examples
htmlcsstinymce

tinymce, image resize, use css instead of <img width & height>


I use this wonderful tool, tinyMCE, for editing pages at my website. But i have a problem with the resizing of images.

Is it possible to change the way tinyMCE changes the size of the image? Now the software changes the width and height inside the ..

<img src="..." width="..." height="..." />

But this setting gets overridden by the CSS. (I have some general img settings in the CSS, width, height:auto, and centering on page.)

If the users define a size for the image, i want this new size to override the general css. But with the img parameter width & height. this is notpossible. CSS override their value.

So.

I want tinyMCE to change the size of the image by CSS. Is this possible?

ex:

<img src="..." style="width:...;height...;" />

(The size is set by draging the corner of an image to the size you want.. and not edited in html html code.)

Thanks for reading. Matte


Solution

  • It doesn't appear to be currently possible to easily change the way TinyMCE adds width and height tags to the img element. There is a feature request open to add this functionality Stop Prepopulating Image Dimensions.