Skip to content

Instantly share code, notes, and snippets.

View SeriaWei's full-sized avatar
:octocat:
Focusing

Wayne SeriaWei

:octocat:
Focusing
View GitHub Profile
@simshaun
simshaun / gist:7592631
Created November 22, 2013 00:37
TinyMCE 4.0.11 - Automatically remove width and height attributes from img elements inserted via the img plugin
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});
}
});
}