From 192258a82d9a025d747f10f911c94311c771cbc3 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Wed, 25 May 2016 17:04:46 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=8F=96=E6=B6=88KE=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=97=B6=E5=80=99=E6=AE=B5=E8=90=BD=E7=9A=84=E4=B8=8A=E4=B8=8B?= =?UTF-8?q?=E8=BE=B9=E8=B7=9D=202.=E5=85=88=E7=BC=96=E5=8F=B7=E5=90=8E?= =?UTF-8?q?=E6=AE=B5=E8=90=BD=20=E5=8F=AF=E4=BB=A5=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=AE=B5=E8=90=BD=E6=A0=B7=E5=BC=8F=20=20=E6=AD=A3=E6=96=87?= =?UTF-8?q?=E8=BF=98=E4=B8=8D=E8=83=BD=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/kindeditor/kindeditor.js | 11 ++++++++++- public/assets/kindeditor/plugins/code/previewcode.css | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) 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(/(