Tinymce: Have a max-width option for images while editing

Created on 12 Oct 2017  路  2Comments  路  Source: tinymce/tinymce

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
When importing an image by pasting the url, the image size isn't adjusted to the editor size inside the iframe, and if the image is bigger it's not fully displayed.
After saving the image, the width is adjusted to the parent element, this is not very WYSIWYG.

What is the expected behavior?
Having an option to have the image resized to the editor width while editing (eg. 'auto') or to manually set the max width by setting it (eg. '300px'),

Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE?
4.7.1 / Firefox 57 / Linux

Most helpful comment

You can set the content_style setting to something like content_style: 'img {max-width: 100%;}' and the images should resize to fit the editor.

All 2 comments

You can set the content_style setting to something like content_style: 'img {max-width: 100%;}' and the images should resize to fit the editor.

thanks, it worked

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ktroendle picture ktroendle  路  3Comments

jsosnowski picture jsosnowski  路  3Comments

HeroPwP picture HeroPwP  路  3Comments

PetrBorisov picture PetrBorisov  路  3Comments

TinyMCE-User picture TinyMCE-User  路  3Comments