refactor: Rename CodeMirror wrapper and fix editor buttons

Renamed Tiptap_editor to CodeMirror_wrapper and updated all usages. Renamed the wrapper file to element_codemirror_editor_wrapper.svelte. Fixed a TypeError in the CodeMirror editor buttons by using EditorSelection.range() to correctly create selection ranges.
This commit is contained in:
Scott Idem
2025-11-18 14:14:24 -05:00
parent 95412dd0ad
commit 691b20fd54
8 changed files with 862 additions and 861 deletions

View File

@@ -32,7 +32,7 @@
} from '$lib/stores/ae_stores';
import { idaa_loc, idaa_sess, idaa_slct, idaa_trig } from '$lib/stores/ae_idaa_stores';
import { events_func } from '$lib/ae_events_functions';
import Tiptap_editor from '$lib/elements/element_codemirror_wrapper.svelte';
import CodeMirror_wrapper from '$lib/elements/element_codemirror_editor_wrapper.svelte';
// export let container_class_li = [];
@@ -932,7 +932,7 @@
<span class="text-lg text-neutral-500 font-semibold"> Short description </span>
<!-- <textarea name="description" id="description" class="ae_value event__description tinymce_editor editor_basic textarea" rows="5" cols="70" bind:value={$idaa_slct.event_obj.description} ></textarea> -->
<Tiptap_editor
<CodeMirror_wrapper
bind:html_text={description_new_html}
classes="preset-tonal-surface hover:preset-filled-surface-100-900 font-mono font-normal"
placeholder="A short description or overview of this recovery meeting"
@@ -1310,7 +1310,7 @@
Additional information about the meeting location
</span>
<!-- <textarea class="ae_value event__location_text tinymce_editor editor_less_100 textarea" id="location_text" name="location_text" placeholder="Additional information about the meeting location" rows="2" cols="70" bind:value={$idaa_slct.event_obj.location_text}></textarea> -->
<Tiptap_editor
<CodeMirror_wrapper
bind:html_text={location_text_new_html}
classes="preset-tonal-surface hover:preset-filled-surface-100-900"
placeholder="Additional information about the meeting location"
@@ -1779,7 +1779,7 @@
Additional information on how to attend
</span>
<!-- <textarea class="ae_value event__attend_text tinymce_editor editor_less_100 textarea" id="attend_text" name="attend_text" placeholder="Additional information on how to attend or join the meeting" rows="2" cols="70" value={$lq__event_obj?.attend_text ?? ''}></textarea> -->
<Tiptap_editor
<CodeMirror_wrapper
bind:html_text={attend_text_new_html}
classes="preset-tonal-surface hover:preset-filled-surface-100-900"
placeholder="Additional information on how to attend or join the meeting"