diff --git a/src/lib/elements/element_ae_obj_field_editor_new.svelte b/src/lib/elements/element_ae_obj_field_editor_new.svelte
index 3bffc4ac..745d6b5b 100644
--- a/src/lib/elements/element_ae_obj_field_editor_new.svelte
+++ b/src/lib/elements/element_ae_obj_field_editor_new.svelte
@@ -17,6 +17,7 @@ import type { Snippet } from 'svelte';
import {
Check,
CircleAlert,
+ Eraser,
LoaderCircle,
Save,
SquarePen,
@@ -27,6 +28,7 @@ import { ae_api, ae_loc } from '$lib/stores/ae_stores';
import { api } from '$lib/api/api';
import { ae_util } from '$lib/ae_utils/ae_utils';
import AE_Comp_Editor_TipTap from '$lib/elements/element_editor_tiptap.svelte';
+import AE_Comp_Editor_CodeMirror from '$lib/elements/element_editor_codemirror.svelte';
interface Props {
// Core Identifiers
@@ -42,6 +44,7 @@ interface Props {
| 'textarea'
| 'select'
| 'tiptap'
+ | 'codemirror'
| 'checkbox'
| 'date'
| 'datetime'
@@ -175,7 +178,7 @@ $effect(() => {
}
});
-// Autofocus when entering edit mode
+// Autofocus when entering edit mode (for simple inputs)
$effect(() => {
if (is_editing && input_ref) {
untrack(() => input_ref?.focus());
@@ -259,7 +262,7 @@ function handle_keydown(e: KeyboardEvent) {
{display_value ? 'True' : 'False'}
- {:else if field_type === 'tiptap'}
+ {:else if field_type === 'tiptap' || field_type === 'codemirror'}
{@html display_value || 'Empty'}
@@ -278,8 +281,8 @@ function handle_keydown(e: KeyboardEvent) {
class:pointer-events-none={!$ae_loc.edit_mode}
tabindex={$ae_loc.edit_mode ? 0 : -1}
onclick={toggle_edit}
- aria-label="Edit {field_name}"
- title="Edit {field_name}">
+ aria-label="Edit {edit_label || field_name}"
+ title="Edit {edit_label || field_name}">
@@ -302,7 +305,8 @@ function handle_keydown(e: KeyboardEvent) {
type="button"
class="btn-icon btn-icon-sm preset-tonal-surface"
onclick={cancel_edit}
- aria-label="Cancel"
+ aria-label="Cancel editing"
+ title="Cancel editing"
disabled={patch_status === 'processing'}>
@@ -346,6 +350,10 @@ function handle_keydown(e: KeyboardEvent) {
+ {:else if field_type === 'codemirror'}
+
{:else if field_type === 'date'}
(draft_value = null)}>
- Set Null
+ onclick={() => (draft_value = null)}
+ aria-label="Clear value"
+ title="Clear value">
+
+ Clear
{/if}
- {$lq__event_location_obj.description}
+
+
+ {@html $lq__event_location_obj.description}
+
{:else}
{@html ae_snip.html__not_set}
{/if}
diff --git a/src/routes/testing/ae_obj_field_editor/+page.svelte b/src/routes/testing/ae_obj_field_editor/+page.svelte
index b7ee6591..ecc0515b 100644
--- a/src/routes/testing/ae_obj_field_editor/+page.svelte
+++ b/src/routes/testing/ae_obj_field_editor/+page.svelte
@@ -191,6 +191,19 @@ function handle_success(data: any) {
{log_lvl} />
+
+
+
+
+