Skip to content

Instantly share code, notes, and snippets.


Wayne SeriaWei

Block or report user

Report or block SeriaWei

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
simshaun / gist:7592631
Created Nov 22, 2013
TinyMCE 4.0.11 - Automatically remove width and height attributes from img elements inserted via the img plugin
View gist:7592631
setup: function (editor) {
editor.on('init', function(args) {
editor =;
editor.on('NodeChange', function(e) {
if (e && e.element.nodeName.toLowerCase() == 'img') {
tinyMCE.DOM.setAttribs(e.element, {'width': null, 'height': null});
You can’t perform that action at this time.