Aded documentation module
This commit is contained in:
@@ -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 || '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user