I can understand if there was a "Media Picker" option that allowed you to choose a width and height to use, but putting these values in there by default causes big headaches for responsive web developers who want to specify generic styles (e.g. percentage width and auto height). I suppose I can add the "!important" rule for now...
I recommend using a widget system using something like Archetype rather than inserting images in the rich text editor.
A clunky workaround, however, would be to have some JavaScript run on page load to strip out the things you don't want (e.g., the inline styles and the width/height query sting parameters).
Or instead of JavaScript, you could also process the markup on the server side to strip that out too. There are libraries in NuGet that help with this.
Tiny MCE img tag - responsive issues
Umbraco 7.1.4
Is there some way to stop Tiny MCE from generating inline styles? When I insert an image, I'd like to see:
<img src="/media/1005/testImg.png" alt="" />
Instead of:
<img style="width: 374px; height:49px;" src="/media/1005/testImg.png?width=374&height=49" alt="testImg.png" rel="1076" />
I can understand if there was a "Media Picker" option that allowed you to choose a width and height to use, but putting these values in there by default causes big headaches for responsive web developers who want to specify generic styles (e.g. percentage width and auto height). I suppose I can add the "!important" rule for now...
What is the resolution for this?
I recommend using a widget system using something like Archetype rather than inserting images in the rich text editor.
A clunky workaround, however, would be to have some JavaScript run on page load to strip out the things you don't want (e.g., the inline styles and the width/height query sting parameters).
Or instead of JavaScript, you could also process the markup on the server side to strip that out too. There are libraries in NuGet that help with this.
is working on a reply...