|
@@ -25,11 +25,11 @@ export const setting = {
|
|
|
let cmd = evt.command;
|
|
|
console.log(cmd)
|
|
|
//设置ul/ol li的字体大小,颜色
|
|
|
- if (cmd === 'FontSize' || cmd === 'FontName' || cmd === 'mceApplyTextcolor' ) {
|
|
|
+ if (cmd === 'FontSize' || cmd === 'FontName' || (cmd === 'mceApplyTextcolor' && evt.ui == 'forecolor') ) {
|
|
|
let val = evt.value;
|
|
|
let node = evt.target.selection.getNode();
|
|
|
let nodeParent = node.parentNode;
|
|
|
- if (node.nodeName === 'SPAN' && nodeParent.nodeName === 'LI') {
|
|
|
+ if (node.nodeName === 'SPAN' && nodeParent.nodeName === 'LI' && nodeParent.childNodes && nodeParent.childNodes.length == 1) {
|
|
|
if (cmd === 'FontSize') {
|
|
|
editor.dom.setStyle(nodeParent, 'font-size', val);
|
|
|
}
|