Skip to content

Commit fce53e5

Browse files
authored
Merge pull request #14 from step2dev/develop
Update RichText component for rich text editing support
2 parents cc736a0 + 10b0e8d commit fce53e5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

resources/views/richtext.blade.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,24 @@
44
'options' => [],
55
])
66
<textarea {{ $attributes->merge(['class' => 'textarea'.($hasError ? ' textarea-error' : '')]) }}>{{ $value ?: $slot }}</textarea>
7+
8+
@props([
9+
'hasError' => false,
10+
'value' => '',
11+
'options' => [],
12+
'quillUniq' => 'quill'
13+
])
14+
<div
15+
{{ $attributes->merge(['class' => ($hasError ? ' textarea-error' : '' }}
16+
x-data="quill({
17+
__value: @entangle($attributes->wire('model')),
18+
options: {{ $options }},
19+
__config(instance, quillOptions) {
20+
return { {{ $config ?? '' }} };
21+
},
22+
})"
23+
x-cloak
24+
>
25+
26+
<div x-ref="quill">{{ $value ?: $slot }}</div>
27+
</div>

0 commit comments

Comments
 (0)