diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js index 39ce0abdb..6b0f1621b 100644 --- a/public/assets/kindeditor/kindeditor.js +++ b/public/assets/kindeditor/kindeditor.js @@ -3311,6 +3311,7 @@ _each(('formatblock,selectall,justifyleft,justifycenter,justifyright,justifyfull if (!_IERANGE || _inArray(name, 'formatblock,selectall,insertorderedlist,insertunorderedlist'.split(',')) >= 0) { self.selection(); } + return self; }; }); @@ -5752,7 +5753,7 @@ _plugin('core', function(K) { h2 : 24, h3 : 18, H4 : 14, - p : 12 + p : 12 }, curVal = self.cmd.val('formatblock'), menu = self.createMenu({ @@ -5770,6 +5771,14 @@ _plugin('core', function(K) { checked : (curVal === key || curVal === val), click : function() { self.select().exec('formatblock', '<' + key + '>').hideMenu(); + //by yk利用html的特性使h1 h2 h3 h4标签之间不能相互包含 并将空的标签去掉 + if (key != "p"){ + var val = self.select().html(); + self.select().html(val); + val = self.select().html().replace(/(