Revert "add a hack to prevent double newlines when deleting formatting"

This reverts commit ecf9776f90.
This commit is contained in:
Damien Elmes 2013-06-14 13:11:04 +09:00
parent e7ec4edf92
commit 49ea66bca9

View file

@ -95,13 +95,6 @@ function onKeyUp(elem) {
if (!elem.lastChild || elem.lastChild.nodeName.toLowerCase() != "br") {
elem.appendChild(document.createElement("br"));
}
var old = elem.innerHTML;
var new_ = old.replace(/<([biu])><br><\\/\\1>/g, "");
if (old != new_) {
elem.innerHTML = new_;
// this may have caused the cursor to disappear
caretToEnd();
}
}
function sendState() {