Aded documentation module

This commit is contained in:
Mark Gregory
2026-06-12 15:32:09 +01:00
parent a2c68bc4dc
commit 1c9ed1a537
18 changed files with 418 additions and 85 deletions
@@ -12,6 +12,7 @@
<div
{{ $attributes->whereDoesntStartWith('wire:model')->merge(['class' => 'space-y-2']) }}
x-on:helpdesk-editor-reset.window="if ($event.detail.model === model) clear()"
x-data="{
model: @js($model),
value: @js($initialValue),
@@ -26,6 +27,13 @@
document.execCommand(action, false, value);
this.sync();
},
clear() {
this.value = '';
this.$refs.editor.innerHTML = '';
if (this.model) {
this.$wire.set(this.model, '', false);
}
},
init() {
this.$refs.editor.innerHTML = this.value || '';
}