2 * IE and Opera leave an empty paragraph in the contentEditable element after clearing it
4 * @param {Object} contentEditableElement The contentEditable element to observe for clearing events
6 * wysihtml5.quirks.ensureProperClearing(myContentEditableElement);
8 wysihtml5.quirks.ensureProperClearing = (function() {
9 var clearIfNecessary = function() {
11 setTimeout(function() {
12 var innerHTML = element.innerHTML.toLowerCase();
13 if (innerHTML == "<p> </p>" ||
14 innerHTML == "<p> </p><p> </p>") {
15 element.innerHTML = "";
20 return function(composer) {
21 wysihtml5.dom.observe(composer.element, ["cut", "keydown"], clearIfNecessary);