Forráskód Böngészése

富文本编辑时,缩小行间距

zq 2 hete
szülő
commit
525e05e7ab
1 módosított fájl, 1 hozzáadás és 5 törlés
  1. 1 5
      src/components/RichText.vue

+ 1 - 5
src/components/RichText.vue

@@ -139,6 +139,7 @@ export default {
       id: getRandomNumber(),
       init: {
         content_style: `
+          p{line-height: 1;}
           mjx-container, mjx-container * {
             font-size: 16px !important; /* 强制固定字体 */
             line-height: 1.2 !important; /* 避免行高影响 */
@@ -341,7 +342,6 @@ export default {
     setRichFormat(type, val) {
       let editor = tinymce.get(this.id);
       if (!editor) return;
-
       editor.execCommand('SelectAll');
 
       switch (type) {
@@ -827,8 +827,4 @@ export default {
     margin: 0 4px;
   }
 }
-
-mjx-container {
-  font-size: 16px !important;
-}
 </style>