1.取消KE编辑时候段落的上下边距

2.先编号后段落 可以切换段落样式  正文还不能切换
This commit is contained in:
yuanke 2016-05-25 17:04:46 +08:00
parent fcaa9666e2
commit 192258a82d
2 changed files with 11 additions and 2 deletions

View File

@ -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(/(<h1>\s*<\/h1>)|(<h2>\s*<\/h2>)|(<h3>\s*<\/h3>)|(<h4>\s*<\/h4>)/g,"");
self.select().html(val);
self.select();
}
}
});
});

View File

@ -53,4 +53,4 @@ span.at a{color:#269ac9;text-decoration: none;}
/*yk*/
.ke-content ol li{list-style-type: decimal;}
.ke-content ul li{list-style-type: disc;}
.ke-content ol,.ke-content ul{margin-top:0;margin-bottom: 0;}
.ke-content ol,.ke-content ul,.ke-content h1,.ke-content h2,.ke-content h3,.ke-content h4{margin-top:0;margin-bottom: 0;}