Browse Source

Merge branch 'bug6666'

ldong 1 month ago
parent
commit
712a154955

+ 8 - 1
src/views/ppt_manage/newVersion/utils/tinymceSetting.js

@@ -23,8 +23,9 @@ export const setting = {
     setup:function(editor){
         editor.on('ExecCommand',function(evt) {
             let cmd = evt.command; 
+            console.log(cmd)
             //设置ul/ol li的字体大小,颜色
-            if (cmd === 'FontSize' || cmd === 'FontName' /* || cmd === 'mceApplyTextcolor' */) {
+            if (cmd === 'FontSize' || cmd === 'FontName'  || cmd === 'mceApplyTextcolor' ) {
                 let val = evt.value; 
                 let node = evt.target.selection.getNode(); 
                 let nodeParent = node.parentNode; 
@@ -35,6 +36,9 @@ export const setting = {
                     if (cmd === 'FontName') { 
                         editor.dom.setStyle(nodeParent, 'font-family', val); 
                     } 
+                    if (cmd === 'mceApplyTextcolor') { 
+                        editor.dom.setStyle(nodeParent, 'color', val); 
+                    }
                 } else if (node.nodeName === 'UL' || node.nodeName === 'OL') { 
                     let li = editor.dom.select('li', node); 
                     if (cmd === 'FontSize') { 
@@ -43,6 +47,9 @@ export const setting = {
                     if (cmd === 'FontName') { 
                         editor.dom.setStyle(li, 'font-family', val); 
                     }
+                    if (cmd === 'mceApplyTextcolor') { 
+                        editor.dom.setStyle(nodeParent, 'color', val); 
+                    }
                 } 
             }
         });

+ 2 - 0
src/views/ppt_manage/newVersion/utils/untils.js

@@ -188,11 +188,13 @@ export const toTextProps = (json) => {
             }
             if (bulletFlag && styleObj['list-type'] === 'ol') {
               options.bullet = { type: 'number', indent: 20 * 0.75 }
+              options.breakLine=true
               options.paraSpaceBefore = 0.1
               bulletFlag = false
             }
             if (bulletFlag && styleObj['list-type'] === 'ul') {
               options.bullet = { indent: 20 * 0.75 }
+              options.breakLine=true
               options.paraSpaceBefore = 0.1
               bulletFlag = false
             }