[OJS3] HTML-Text-Editor: Dimensions for images

@asmecher My publisher has tried to set the dimensions for an image, which was inserted with the HTML text editor in “additional_content”, with the “Dimensions” section of the insert image pop-up dialogue (see screenshot below).

This fails, because those dimensions are inserted into HTML as <img src="xyz" width="60" height="82" />. Those “presentational attributes” are the weakest in CSS order and therefore overridden by any other styling information whatsoever – even width: auto; height: auto; in the base CSS will destroy the influence of those attributes.

But the user expects to effect the appearence of the image directly with these attributes.

So I’d like to initiate a short pro/con discussion, if it would be better to change the HTML output of these attributes to <img src="xyz" style="width:60px; height:82px" /> (if no unit is defined by the user, use “px” as the standard unit), before launching a feature request.

Best regards
Tobias

HTML-Text-Editor-Insert-Image HTML-Text-Editor-Insert-Image

Hi @twa,

Can you please supply your OJS version number?

-Roger
PKP Team

@rcgillis Sorry: 3.2.1.1

Thanks, Tobias.

Hi @twa,

The CSS style properties applied to images is important for them to adjust appropriately to different screen sizes. I don’t know of any way around that which is going to work in all cases.

The actual HTML output of the <img> tag is controlled by TinyMCE, the editor tool, so I’m not sure that we can apply width/height variables in the style attribute.