Cleaning up and removing old legacy code and files
This commit is contained in:
@@ -85,7 +85,7 @@ type CMCache = {
|
||||
|
||||
const GLOBAL_KEY = '__cm_singleton_modules_v1';
|
||||
|
||||
export async function ensureCodeMirrorModules(): Promise<CMCache> {
|
||||
export async function ensure_CodeMirror_modules(): Promise<CMCache> {
|
||||
if (!browser) return null;
|
||||
|
||||
// Use a single global object so HMR/multiple module copies reuse same instance
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
*/
|
||||
import { onMount, onDestroy, untrack } from 'svelte';
|
||||
import { browser } from '$app/environment';
|
||||
import { ensureCodeMirrorModules } from './codemirror_modules';
|
||||
import type { key_val } from '$lib/stores/ae_stores';
|
||||
import { ensure_CodeMirror_modules } from './codemirror_modules';
|
||||
// import type { key_val } from '$lib/stores/ae_stores';
|
||||
|
||||
// Icons (Standardized to Lucide where possible, or FontAwesome placeholders)
|
||||
import { Bold, Code, Italic, List, Maximize2 } from '@lucide/svelte';
|
||||
import { Bold, Code, Italic, List, } from '@lucide/svelte';
|
||||
interface Props {
|
||||
content?: string;
|
||||
new_content?: string;
|
||||
@@ -46,7 +46,7 @@
|
||||
async function create_editor() {
|
||||
if (!browser) return;
|
||||
|
||||
cm = await ensureCodeMirrorModules();
|
||||
cm = await ensure_CodeMirror_modules();
|
||||
if (!cm) return;
|
||||
|
||||
// Cleanup existing instance if HMR or remount occurs
|
||||
|
||||
Reference in New Issue
Block a user