Files
OSIT-AE-App-Svelte/src/lib/elements/element_codemirror_editor_wrapper.svelte
Scott Idem bf834aa165 chore: rename editor components and analytics to follow element_* convention
- AE_Comp_Editor_CodeMirror.svelte → element_editor_codemirror.svelte
- AE_Comp_Editor_TipTap.svelte → element_editor_tiptap.svelte
- analytics.svelte → e_app_analytics.svelte (matches e_app_* prefix of siblings)
- Updated all import paths; import variable names unchanged

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 09:49:57 -04:00

30 lines
820 B
Svelte

<script lang="ts">
import AE_Comp_Editor_CodeMirror from './element_editor_codemirror.svelte';
import { browser } from '$app/environment';
interface Props {
html_text?: string;
placeholder?: string;
classes?: string;
}
let {
html_text = $bindable(''),
placeholder = 'Type your text here...',
classes = ''
}: Props = $props();
</script>
<div class="block w-full h-full {classes}">
{#if browser}
<AE_Comp_Editor_CodeMirror
bind:content={html_text}
{placeholder}
class_li="p-1 transition-all duration-1000"
/>
{:else}
<!-- server / prerender placeholder to avoid SSR loading CM -->
<div class="p-2 text-sm text-surface-600-400">Editor (client only)</div>
{/if}
</div>