Lots of work making CodeMirror work. It is in a mostly useable state now.
This commit is contained in:
@@ -28,8 +28,8 @@ import {
|
||||
// import E_app_codemirror from '$lib/e_app_codemirror.svelte';
|
||||
// import E_app_codemirror_v4 from '$lib/e_app_codemirror_v4.svelte';
|
||||
import E_app_codemirror_v5 from '$lib/e_app_codemirror_v5.svelte';
|
||||
import {javascript} from "@codemirror/lang-javascript";
|
||||
import {markdown} from "@codemirror/lang-markdown";
|
||||
// import {javascript} from "@codemirror/lang-javascript";
|
||||
// import {markdown} from "@codemirror/lang-markdown";
|
||||
|
||||
|
||||
// *** Import Aether specific variables and functions
|
||||
@@ -1792,7 +1792,7 @@ tabindex={$ae_loc.edit_mode ? 0 : -1} -->
|
||||
"
|
||||
>
|
||||
{#if (!$journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id])}
|
||||
|
||||
{#if !$ae_loc.edit_mode || !$ae_loc.trusted_access}
|
||||
<article
|
||||
class="
|
||||
flex-grow
|
||||
@@ -1851,6 +1851,25 @@ tabindex={$ae_loc.edit_mode ? 0 : -1} -->
|
||||
<!-- {@html encrypt_content($lq__journal_entry_obj?.content, journal_key)} -->
|
||||
<!-- --{@html encrypted_base64_string}-- -->
|
||||
<!-- {@html marked.parse($lq__journal_entry_obj?.content)} -->
|
||||
{:else}
|
||||
|
||||
<E_app_codemirror_v5
|
||||
editable={false}
|
||||
readonly={true}
|
||||
content={tmp_entry_obj?.content ?? ''}
|
||||
bind:new_content={tmp_entry_obj.content}
|
||||
bind:theme_mode={$ae_loc.theme_mode}
|
||||
placeholder="Write using Markdown here..."
|
||||
class="
|
||||
p-2
|
||||
bg-slate-100 text-gray-900
|
||||
dark:bg-slate-900 dark:text-gray-100
|
||||
shadow-lg rounded-lg
|
||||
border border-gray-200 dark:border-gray-700
|
||||
hover:border-green-500 dark:hover:border-green-500
|
||||
"
|
||||
/>
|
||||
{/if}
|
||||
|
||||
{:else if ($journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] == 'current')}
|
||||
<!-- && !($lq__journal_entry_obj?.content_encrypted && decrypted_content)) -->
|
||||
@@ -1935,17 +1954,10 @@ tabindex={$ae_loc.edit_mode ? 0 : -1} -->
|
||||
<E_app_codemirror_v5
|
||||
content={tmp_entry_obj?.content ?? ''}
|
||||
bind:new_content={tmp_entry_obj.content}
|
||||
language={markdown()}
|
||||
placeholder="Write your JavaScript code here..."
|
||||
classes="
|
||||
flex-grow
|
||||
flex-shrink-0
|
||||
basis-full
|
||||
h-max min-h-max max-h-full
|
||||
w-full min-w-full max-w-6xl
|
||||
bind:theme_mode={$ae_loc.theme_mode}
|
||||
placeholder="Write using Markdown here..."
|
||||
class="
|
||||
p-2
|
||||
space-y-1
|
||||
font-mono
|
||||
bg-slate-100 text-gray-900
|
||||
dark:bg-slate-900 dark:text-gray-100
|
||||
shadow-lg rounded-lg
|
||||
|
||||
Reference in New Issue
Block a user