Skip to content

Commit

Permalink
BUGFIX 🐛 Deal with multiple instances on one page
Browse files Browse the repository at this point in the history
  • Loading branch information
ndeblauw committed Nov 24, 2024
1 parent 240d0ac commit 1177fb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions resources/views/components/formelements/textarea.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
id="{{ $id }}"
rows="{{ $rows }}"
placeholder="{!! $placeholder !!}"
class="{{ $rte ? 'tinymce' : '' }} max-w-lg block w-full shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:max-w-lg sm:text-sm {{ $errors->first($name) ? 'border-red-300' : 'border-gray-300' }} rounded-md"
class="{{ $rte ? $name.'_rte' : '' }} max-w-lg block w-full shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:max-w-lg sm:text-sm {{ $errors->first($name) ? 'border-red-300' : 'border-gray-300' }} rounded-md"
{{ $required ? 'required' : '' }}
{{$disabled}}
>{{ old($name, $value) }}</textarea>
Expand All @@ -24,7 +24,7 @@ class="{{ $rte ? 'tinymce' : '' }} max-w-lg block w-full shadow-sm focus:ring-bl
<script src="https://cdn.ckeditor.com/ckeditor5/36.0.1/classic/ckeditor.js"></script>
<script>
ClassicEditor
.create(document.querySelector('.tinymce'),{
.create(document.querySelector('.{{$name}}_rte'),{
// Configure the toolbar with only the tools you need
toolbar: [
'bold', 'italic', 'underline', 'strikethrough',
Expand Down Expand Up @@ -53,7 +53,7 @@ class="{{ $rte ? 'tinymce' : '' }} max-w-lg block w-full shadow-sm focus:ring-bl
var editor_config = {
relative_urls : false,
path_absolute: "{{ URL::to('/') }}/",
selector: '.tinymce',
selector: '.{{$name}}_rte',
menubar: false,
plugins: [
'advlist autolink lists link image charmap print preview anchor',
Expand Down

0 comments on commit 1177fb9

Please sign in to comment.