-
-
Save Maasik/d3f6ff74f1ef93914460579099f02c7a to your computer and use it in GitHub Desktop.
TinyMCE 4.0.11 - Automatically remove width and height attributes from img elements inserted via the img plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setup: function (editor) { | |
editor.on('init', function(args) { | |
editor = args.target; | |
editor.on('NodeChange', function(e) { | |
if (e && e.element.nodeName.toLowerCase() == 'img') { | |
tinyMCE.DOM.setAttribs(e.element, {'width': null, 'height': null}); | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment