refactor: consolidate CodeMirror editors into unified AE_Comp_Editor_CodeMirror component
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
import { LockKeyhole, Save, RefreshCcw } from 'lucide-svelte';
|
||||
import { ae_loc } from '$lib/stores/ae_stores';
|
||||
import { journals_loc, journals_sess } from '$lib/ae_journals/ae_journals_stores';
|
||||
import E_app_codemirror_v5 from '$lib/app_components/e_app_codemirror_v5.svelte';
|
||||
import AE_Comp_Editor_CodeMirror from '$lib/elements/AE_Comp_Editor_CodeMirror.svelte';
|
||||
import type { ae_JournalEntry, ae_Journal } from '$lib/types/ae_types';
|
||||
|
||||
interface Props {
|
||||
@@ -73,13 +73,12 @@
|
||||
{:else}
|
||||
<!-- Actual Editor -->
|
||||
{#if journal?.cfg_json?.pref_editor == 'codemirror'}
|
||||
<E_app_codemirror_v5
|
||||
content={tmp_entry_obj?.content ?? ''}
|
||||
bind:new_content={tmp_entry_obj.content}
|
||||
bind:editorView={editor_view}
|
||||
<AE_Comp_Editor_CodeMirror
|
||||
bind:content={tmp_entry_obj.content}
|
||||
bind:editor_view={editor_view}
|
||||
theme_mode={$ae_loc.theme_mode}
|
||||
placeholder="Write using Markdown..."
|
||||
class="p-2 preset-outlined-warning-300-700 shadow-lg rounded-lg w-full max-w-6xl bg-surface-50 dark:bg-surface-800"
|
||||
class_li="p-2 preset-outlined-warning-300-700 shadow-lg rounded-lg w-full max-w-6xl bg-surface-50 dark:bg-surface-800"
|
||||
/>
|
||||
{:else}
|
||||
<textarea
|
||||
|
||||
Reference in New Issue
Block a user