Fix duplicate declaration of editorView in CodeMirror component
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
// Props
|
// Props
|
||||||
content?: string;
|
content?: string;
|
||||||
new_content?: string;
|
new_content?: string;
|
||||||
|
editorView?: any; // Added to interface
|
||||||
// export let language: Extension = markdown(); // javascript()
|
// export let language: Extension = markdown(); // javascript()
|
||||||
theme_mode?: string; // 'dark' | 'light'
|
theme_mode?: string; // 'dark' | 'light'
|
||||||
extensions?: any[]; // Changed to any[] because Extension type is not directly available here
|
extensions?: any[]; // Changed to any[] because Extension type is not directly available here
|
||||||
@@ -43,7 +44,7 @@
|
|||||||
}: Props = $props();
|
}: Props = $props();
|
||||||
|
|
||||||
let editor_element: HTMLDivElement = $state();
|
let editor_element: HTMLDivElement = $state();
|
||||||
let editorView: any = $state(); // Changed to any
|
// let editorView: any = $state(); // Removed redundant declaration
|
||||||
let cm_modules: any = $state(); // To hold the dynamically loaded CodeMirror modules
|
let cm_modules: any = $state(); // To hold the dynamically loaded CodeMirror modules
|
||||||
let editor_extensions: any[] = $state([]);
|
let editor_extensions: any[] = $state([]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user