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

131744 add custom syntaxHighlighting

soumaeda 2 лет назад
Родитель
Сommit
e47646505f

+ 2 - 0
packages/editor/src/services/codemirror-editor/use-codemirror-editor/use-codemirror-editor.ts

@@ -46,6 +46,8 @@ const defaultExtensions: Extension[] = [
   markdown({ base: markdownLanguage, codeLanguages: languages }),
   markdown({ base: markdownLanguage, codeLanguages: languages }),
   keymap.of([indentWithTab]),
   keymap.of([indentWithTab]),
   Prec.lowest(keymap.of(defaultKeymap)),
   Prec.lowest(keymap.of(defaultKeymap)),
+  syntaxHighlighting(markdownHighlighting),
+  Prec.lowest(syntaxHighlighting(defaultHighlightStyle)),
 ];
 ];
 
 
 export const useCodeMirrorEditor = (props?: UseCodeMirror): UseCodeMirrorEditor => {
 export const useCodeMirrorEditor = (props?: UseCodeMirror): UseCodeMirrorEditor => {