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

2.先编号后段落 可以切换段落样式  正文还不能切换
yuanke_org
yuanke 9 years ago
parent fcaa9666e2
commit 192258a82d

@ -3311,6 +3311,7 @@ _each(('formatblock,selectall,justifyleft,justifycenter,justifyright,justifyfull
if (!_IERANGE || _inArray(name, 'formatblock,selectall,insertorderedlist,insertunorderedlist'.split(',')) >= 0) { if (!_IERANGE || _inArray(name, 'formatblock,selectall,insertorderedlist,insertunorderedlist'.split(',')) >= 0) {
self.selection(); self.selection();
} }
return self; return self;
}; };
}); });
@ -5752,7 +5753,7 @@ _plugin('core', function(K) {
h2 : 24, h2 : 24,
h3 : 18, h3 : 18,
H4 : 14, H4 : 14,
p : 12 p : 12
}, },
curVal = self.cmd.val('formatblock'), curVal = self.cmd.val('formatblock'),
menu = self.createMenu({ menu = self.createMenu({
@ -5770,6 +5771,14 @@ _plugin('core', function(K) {
checked : (curVal === key || curVal === val), checked : (curVal === key || curVal === val),
click : function() { click : function() {
self.select().exec('formatblock', '<' + key + '>').hideMenu(); 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();
}
} }
}); });
}); });

@ -53,4 +53,4 @@ span.at a{color:#269ac9;text-decoration: none;}
/*yk*/ /*yk*/
.ke-content ol li{list-style-type: decimal;} .ke-content ol li{list-style-type: decimal;}
.ke-content ul li{list-style-type: disc;} .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;}
Loading…
Cancel
Save