How to Remove Height and Width Image Attributes in EPiServer TinyMCE Editor
So I work with a site with a lot of web authors, and most of them are working on the website because their boss told them to work on the website. As a result, we have some web authors who are really savvy and others who don't have a lot of experience One of the issues we had was by default the image height and width attributes were being added to images in the TinyMCE editor, which breaks distorts the images when viewed on smaller screen sizes. So in order to solve this. I had to write a custom TinyMCE plugin that works with EPiserver that will remove the attributes when an image is added to epi. Here is my complete code - I'll talk about the specific details later if you are interested. I'm using the latest TinyMCE 2 for this. tinymce.PluginManager.add('remove-img-dimensions', function (editor, url) { editor.on('BeforeSetContent', function (e) { if (e.content.startsWith('<img')) { e.content = e.content.replace('h...