HackerWins/summernote — pull request #555 by lauxley (2014-08-20 14:05:41+00:00)
Title: Add 2 events: before and after a dom element insertion.

These 2 events allow to better control the flow of inserting a media, allowing to do something like this for example:
```javascript
onBeforeInsert: function(node, range) {
var $node = $(node);
if ($node.is('img')) {
$node.css('width', '100%');
} else if ($node.is('iframe')) {
$node.attr('width', '100%');
$node.attr('height', '');
}
},
```
which makes images and video iframes responsive.
To be honest, it still feels like a hack and i'd rather be able to configure the 'template' used by each Editor actions instead of changing their attributes afterwards, but it does the job and feels less of a hack than catching the onchange event and avoid flickering by changing the attributes or position before it is actually added to the dom.