I am using trix in a
<x-input.rich-text
wire:model="description"></x-input.rich-text>
like in the Surge video.
However, since it is using wire:ignore
, the “CLEAR” method doesn’t clear the rich text editor
public function clear()
{
$this->title = null;
$this->user_id = null;
$this->description = '';
} // end function
Is there a way to tell wire:ignore it’s OK to respect this clear?
@props(['initialValue' => ''])
<div class="rounded-md shadow-sm"
wire:ignore
{{ $attributes }}
x-data
@trix-blur="$dispatch('change', $event.target.value)">
<input id="x" value="{{ $initialValue }}" type="hidden">
<trix-editor input="x" class="form-textarea block w-full transition duration-150 ease-in-out sm:text-sm sm:leading-5"></trix-editor>
</div>