this.wmonkeypatch.modal();
this.wmonkeypatch.paste();
this.wmonkeypatch.observe();
+ this.wmonkeypatch.selection();
this.wmonkeypatch.utils();
// templates
}).bind(this);
},
+ /**
+ * Partially overwrites the 'selection' module.
+ *
+ * - remove superflous empty text nodes caused by the selection markers (#2083)
+ */
+ selection: function() {
+ // selection.removeMarkers
+ this.selection.removeMarkers = (function() {
+ this.$editor.find('span.redactor-selection-marker').each(function(index, marker) {
+ var $nextSibling = marker.nextSibling;
+ if ($nextSibling !== null && $nextSibling.nodeType === Element.TEXT_NODE && $nextSibling.length === 0) {
+ $($nextSibling).remove();
+ }
+
+ $(marker).remove();
+ });
+ }).bind(this);
+ },
+
/**
* Partially overwrites the 'utils' module.
*