Просмотр исходного кода

set font-family for CodeMirrorEditor

Yuki Takei 2 лет назад
Родитель
Сommit
32be4b0fb1

+ 4 - 4
apps/app/src/styles/_editor.scss

@@ -4,6 +4,10 @@
 
 @import './organisms/wiki-custom-sidebar';
 
+:root {
+  --grw-codemirror-editor-content-font-family: var(--font-family-monospace);
+}
+
 // global imported
 .layout-root.editing {
   overflow: hidden !important;
@@ -69,10 +73,6 @@
         }
       }
 
-      .textarea-editor {
-        font-family: var(--font-family-monospace);
-        border: none;
-      }
     }
 
     .page-editor-preview-container {

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

@@ -7,6 +7,10 @@
     width: 100%;
     height: 100%;
 
+    .cm-content {
+      font-family: var(--grw-codemirror-editor-content-font-family, monospace);
+    }
+
     // Header highlight style
     .cm-header {
       text-decoration: none;