diff --git a/src/case/richeditor/niceditor/niceditor.js b/src/case/richeditor/niceditor/niceditor.js index 64dde72095..612dc46d03 100644 --- a/src/case/richeditor/niceditor/niceditor.js +++ b/src/case/richeditor/niceditor/niceditor.js @@ -60,13 +60,13 @@ selectCheck: function (e) { var t = e.target; var found = false; + this.instance.saveRng(); do { if (t.nodeName !== "svg" && t.className && t.className.indexOf(prefix) != -1) { return; // return false; } if (this.instance.checkToolbar(t)) { - this.instance.saveRng(); return; } } while (t = t.parentNode); @@ -85,8 +85,8 @@ }, setValue: function (v) { - v = v || ""; - v = v.startWith("
") ? v : "
" + v + "
"; this.instance.setContent(v); }, @@ -121,7 +121,7 @@ nicEditorInstance.superclass._init.apply(this, arguments); var o = this.options; var initValue = o.value || "") ? initValue : "
" + initValue + "
"; this.ne = this.options.ne; this.elm = BI.createWidget({ type: "bi.layout", @@ -281,7 +281,7 @@ keyDown: function (e, t) { if (e.keyCode === 8) { var html = this.elm.element.html().toLowerCase().trim(); - if (html === "