Real work on getting CodeMirror working. I at least have a fancy highlighter and basic editor.
This commit is contained in:
@@ -25,7 +25,11 @@ import {
|
||||
} from '@lucide/svelte';
|
||||
|
||||
|
||||
import E_app_codemirror from '$lib/e_app_codemirror.svelte';
|
||||
// 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 Aether specific variables and functions
|
||||
@@ -2038,18 +2042,30 @@ zzzz
|
||||
{@html test_html}
|
||||
</div> -->
|
||||
|
||||
xxx
|
||||
{#if $ae_loc.edit_mode && $ae_loc.trusted_access}
|
||||
<div
|
||||
id="journal_entry_codemirror"
|
||||
class:hidden={!$ae_loc.edit_mode}
|
||||
>
|
||||
<!-- {cm_view} -->
|
||||
<!-- <CodeMirror bind:value class="editor" {...props} /> -->
|
||||
<!-- bind:value={cm_view} -->
|
||||
<E_app_codemirror
|
||||
<!-- <E_app_codemirror
|
||||
classes="editor"
|
||||
/> -->
|
||||
<!-- bind:content={tmp_entry_obj.content} -->
|
||||
<E_app_codemirror_v5
|
||||
bind:content={tmp_entry_obj.content}
|
||||
bind:new_content={tmp_entry_obj.new_content}
|
||||
language={markdown()}
|
||||
placeholder="Write your JavaScript code here..."
|
||||
/>
|
||||
|
||||
<pre>
|
||||
{tmp_entry_obj.new_content}
|
||||
</pre>
|
||||
</div>
|
||||
zzz
|
||||
{/if}
|
||||
|
||||
<section class="ae_meta flex flex-row flex-wrap gap-1 items-center justify-between w-full">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user