1
- import { EDITOR_BASE_SETUP } from '@codeimage/config' ;
1
+ import {
2
+ EDITOR_BASE_SETUP ,
3
+ SUPPORTED_LANGUAGES ,
4
+ SUPPORTED_THEMES ,
5
+ } from '@codeimage/config' ;
2
6
import { editor$ , setFocus } from '@codeimage/store/editor' ;
3
7
import { EditorView , lineNumbers } from '@codemirror/view' ;
4
8
import { debounceTime , ReplaySubject , takeUntil } from 'rxjs' ;
@@ -10,17 +14,18 @@ import {
10
14
createResource ,
11
15
onCleanup ,
12
16
} from 'solid-js' ;
13
- import { appEnvironment } from '../../core/configuration' ;
17
+ import { SUPPORTED_FONTS } from '../../core/configuration/font ' ;
14
18
import { fromObservableObject } from '../../core/hooks/from-observable-object' ;
15
19
import { focusedEditor$ , setCode } from '../../state/editor' ;
16
20
import { createCustomFontExtension } from './custom-font-extension' ;
17
21
import { observeFocusExtension } from './observe-focus-extension' ;
18
22
19
23
export const CustomEditor = ( ) => {
20
24
let editorEl ! : HTMLDivElement ;
21
-
22
25
const destroy$ = new ReplaySubject < void > ( 1 ) ;
23
- const { languages, themes, fonts} = appEnvironment ;
26
+ const themes = SUPPORTED_THEMES ;
27
+ const languages = SUPPORTED_LANGUAGES ;
28
+ const fonts = SUPPORTED_FONTS ;
24
29
const editor = fromObservableObject ( editor$ ) ;
25
30
26
31
const selectedLanguage = createMemo ( ( ) =>
0 commit comments