diff --git a/src/routes/journals/JournalEntry_Editor.svelte b/src/routes/journals/JournalEntry_Editor.svelte
new file mode 100644
index 00000000..cb50b42e
--- /dev/null
+++ b/src/routes/journals/JournalEntry_Editor.svelte
@@ -0,0 +1,131 @@
+
+
+
+ {#if !is_editing}
+
+ {#if journal?.cfg_json?.pref_viewer == 'codemirror'}
+
+ {:else if journal?.cfg_json?.pref_viewer == 'plain'}
+
+ {tmp_entry_obj.content || '-- No Content --'}
+
+ {:else}
+
+
+ {#if tmp_entry_obj?.content_md_html}
+ {@html tmp_entry_obj.content_md_html}
+ {:else if tmp_entry_obj?.content_encrypted && entry.private}
+
+
+ Private encrypted content (Decrypt to view)
+
+ {/if}
+
+ {/if}
+ {:else}
+
+ {#if !tmp_entry_obj?.content && tmp_entry_obj?.content_encrypted}
+
+
+
+
+ Decryption Required
+
+
This entry must be decrypted before it can be edited.
+ {#if tmp_entry_obj?.content === false}
+
Decryption failed. Please check your journal passcodes.
+ {/if}
+
+ {:else}
+
+ {#if journal?.cfg_json?.pref_editor == 'codemirror'}
+
+ {:else}
+
+ {/if}
+
+
+
+ Save
+
+
+
+
+ Save Changes
+
+
+ {#if updated_idb}
+
+ IDB object updated since last load!
+
+ {/if}
+ {/if}
+ {/if}
+
diff --git a/src/routes/journals/ae_comp__journal_entry_obj_id_view.svelte b/src/routes/journals/ae_comp__journal_entry_obj_id_view.svelte
index e1bee490..98017ea3 100644
--- a/src/routes/journals/ae_comp__journal_entry_obj_id_view.svelte
+++ b/src/routes/journals/ae_comp__journal_entry_obj_id_view.svelte
@@ -93,6 +93,7 @@
import AE_AITools from '$lib/ae_elements/AE_AITools.svelte';
import AE_ObjectFlags from '$lib/ae_elements/AE_ObjectFlags.svelte';
import AE_MetadataFooter from '$lib/ae_elements/AE_MetadataFooter.svelte';
+ import JournalEntry_Editor from './JournalEntry_Editor.svelte';
import JournalEntry_Metadata from './JournalEntry_Metadata.svelte';
// *** Configuration
@@ -1734,332 +1735,40 @@
/>
- {#if !$journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id]}
- {#if $lq__journal_obj?.cfg_json?.pref_viewer == 'codemirror'}
-
- {#if tmp_entry_obj?.content_md_html}
- {@html tmp_entry_obj?.content_md_html}
- {:else if tmp_entry_obj?.content_encrypted && tmp_entry_obj?.private}
-
-
- Private encrypted content (Decrypt to view)
-
- {/if}
-
- {/if}
- {#if $lq__journal_entry_obj?.data_json?.hosted_file_kv}
-
- The entry must be decrypted before it can be edited.
- {#if tmp_entry_obj?.content === false && $journals_sess?.journal_kv[$lq__journal_obj?.id]?.journal_passcode_verified}
-
-
- Decryption failed. Check the passcode(s).
-
- {:else if tmp_entry_obj?.content === false}
-
-
- Decryption failed. You may need to enter the Journal's private passcode.
-
- {/if}
- {#if tmp_entry_obj?.content === false && $lq__journal_obj?.id && $journals_sess?.journal_kv[$lq__journal_obj?.id]?.journal_passcode_verified}
-
- This might not be encoded with the private passcode or a passcode
- has changed?
-
- {/if}
-
- {:else}
- {#if $lq__journal_obj?.cfg_json?.pref_editor == 'codemirror'}
-
-
+ entry={$lq__journal_entry_obj}
+
+ journal={$lq__journal_obj}
+
+ bind:tmp_entry_obj={tmp_entry_obj}
+
+ bind:editorView={editorView}
+
+ has_changed={tmp_entry_obj_changed}
+
+ updated_idb={updated_idb}
+
+ onSave={update_journal_entry}
-
- {:else}
-
- {/if}
-
- {
- update_journal_entry();
- }}
- disabled={!tmp_entry_obj_changed}
- class:invisible={!tmp_entry_obj_changed}
- class="
- btn btn-sm md:btn-md lg:btn-lg
+
- min-w-72 w-full lg:min-w-96
- max-w-96
+
+
- preset-outlined-warning-900-100
- preset-filled-warning-50-950
-
- hover:variant-outline-success-900-100
- hover:preset-filled-success-50-950
- "
- >
-
- Save Changes
-
-
-
- {#if updated_idb}
-
- WARNING: IDB object has been updated since last load.
-
- {/if}
-
-
-
-
-
- {
- update_journal_entry();
- }}
- disabled={!tmp_entry_obj_changed}
- class:hidden={!tmp_entry_obj_changed}
- class="
- btn btn-sm md:btn-md lg:btn-lg
-
- fixed top-96 md:top-72 right-6
- min-w-24 w-full lg:min-w-32
- max-w-40
-
- preset-outlined-warning-900-100
- preset-filled-warning-50-950
-
- hover:variant-outline-success-900-100
- hover:preset-filled-success-50-950
-
- "
- >
-
- Save Changes
-
-
-
- {/if}
-
- {#if $lq__journal_entry_obj?.journal_entry_id}
-
-
-
- {#if $lq__journal_entry_obj?.data_json?.hosted_file_kv}
-
-
-
-
-
- Download Files:
-
-
-
- {#each Object.entries($lq__journal_entry_obj?.data_json?.hosted_file_kv) as [key, hosted_file_obj]}
-
- {/each}
-
- {/if}
- {:else}
-
-
- Save the form first before uploading a file.
-
- {/if}
- {:else if $journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] == 'history'}
+ {#if $journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] == 'history'}