Procházet zdrojové kódy

131744 remove underline using ͼ7

soumaeda před 2 roky
rodič
revize
7d8230ea2c

+ 27 - 0
packages/editor/src/components/CodeMirrorEditor/CodeMirrorEditor.module.scss

@@ -5,4 +5,31 @@
     height: 100%;
   }
 
+  .cm-header-1 {
+    font-size: 1.9em;
+  }
+  .cm-header-2 {
+    font-size: 1.6em;
+  }
+  .cm-header-3 {
+    font-size: 1.4em;
+  }
+  .cm-header-4 {
+    font-size: 1.35em;
+  }
+  .cm-header-5 {
+    font-size: 1.25em;
+  }
+  .cm-header-6 {
+    font-size: 1.2em;
+  }
+
+  .ͼ7 {
+    text-decoration: none;
+  }
+
+  .ͼ5 {
+    font-style: italic;
+  }
+
 }

+ 6 - 6
packages/editor/src/services/codemirror-editor/use-codemirror-editor/use-codemirror-editor.ts

@@ -19,12 +19,12 @@ import { useReplaceText, type ReplaceText } from './utils/replace-text';
 import { useSetCaretLine, type SetCaretLine } from './utils/set-caret-line';
 
 const markdownHighlighting = HighlightStyle.define([
-  { tag: tags.heading1, fontSize: '1.9em', textDecoration: 'none' },
-  { tag: tags.heading2, fontSize: '1.6em', textDecoration: 'none' },
-  { tag: tags.heading3, fontSize: '1.4em', textDecoration: 'none' },
-  { tag: tags.heading4, fontSize: '1.35em', textDecoration: 'none' },
-  { tag: tags.heading5, fontSize: '1.25em', textDecoration: 'none' },
-  { tag: tags.heading6, fontSize: '1.2em', textDecoration: 'none' },
+  { tag: tags.heading1, class: 'cm-header-1' },
+  { tag: tags.heading2, class: 'cm-header-2' },
+  { tag: tags.heading3, class: 'cm-header-3' },
+  { tag: tags.heading4, class: 'cm-header-4' },
+  { tag: tags.heading5, class: 'cm-header-5' },
+  { tag: tags.heading6, class: 'cm-header-6' },
 ]);
 
 type UseCodeMirrorEditorUtils = {