// assign a unique id in order to recognize the inserted quote
$html = $html.replace(/<blockquote/, '<blockquote id="' + $id + '"');
+ var $originalRange = window.getSelection().getRangeAt(0).cloneRange();
+
this.wutil.restoreSelection();
var $selection = window.getSelection().getRangeAt(0);
var $current = $selection.startContainer;
this.insert.html($html, false);
+ $originalRange.deleteContents();
+
$quote = this.$editor.find('#' + $id);
if ($quote.length) {
// quote may be empty if $innerHTML was empty, fix it