Merge branch 'master' into 'master'

ke编辑器的placeholder属性调整



See merge request !7
This commit is contained in:
陈晓婷 2017-10-17 09:18:00 +08:00
commit 9510b684ef
1 changed files with 5 additions and 1 deletions

View File

@ -5381,7 +5381,11 @@ KEditor.prototype = {
return this;
},
appendHtml : function(val) {
this.html(this.html() + val);
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*[\]*[\]*[\u4e00-\u9fa5]*[\]*[\u4e00-\u9fa5]*[\。]*[\]*<\/\w*\>\s*$/.test(this.html())){
this.html(val);
} else{
this.html(this.html() + val);
}
if (this.isCreated) {
var cmd = this.cmd;
cmd.range.selectNodeContents(cmd.doc.body).collapse(false);