| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- @php
- use Filament\Support\Facades\FilamentAsset;
- $statePath = $getStatePath();
-
- @endphp
- <x-dynamic-component
- :component="$getFieldWrapperView()"
- :field="$field"
- >
- <div
- @class([
- 'lexical-editor rounded-md relative text-gray-950 bg-white shadow-sm ring-1 dark:bg-white/5 dark:text-white',
- 'ring-gray-950/10 dark:ring-white/20' => ! $errors->has($statePath),
- 'ring-danger-600 dark:ring-danger-600' => $errors->has($statePath),
- ])
-
- >
-
- <div
- ax-load="visible"
- ax-load-src="{{ FilamentAsset::getAlpineComponentSrc('lexical-component', 'malzariey/filament-lexical-editor') }}"
- x-data="lexicalComponent({
- state: $wire.{{ $applyStateBindingModifiers("\$entangle('{$statePath}')") }},
- enabledToolbars: @js($getEnabledToolbars()),
- basicColors: @js(['#ef3346', '#1A3673', '#FF7500', '#00B6ED', '#6557B8', '#00AB16'])
- })"
-
- x-ignore
- wire:ignore
-
- class="editor-shell w-full"
- >
-
- <style>
- .lexical__h2 { font-size: 22px; font-weight: 500; }
- .lexical__h3 { font-size: 18px; font-weight: 400; }
- .lexical__h4 { font-size: 18px; font-weight: 400; }
- .lexical__h5 { font-size: 17.008px; font-weight: 400; }
- .lexical__listItem { font-size: 15px; font-weight: 400; }
- .lexical__paragraph { font-size: 15px; font-weight: 400; }
- </style>
-
- <div class="toolbar flex-wrap">
- @foreach($getEnabledToolbars() as $toolbar)
- <x-filament-lexical-editor::toolbar :toolbar="$toolbar"/>
- @endforeach
- </div>
-
- <div class="editor-container tree-view p-2 ">
- <div class="editor-scroller">
- <div x-ref="editor"
- @link-clicked="showLinkEditorDialog( $event.detail.target,$event.detail.url, false)"
- @link-created="showLinkEditorDialog( $event.detail.target, $event.detail.url,)"
- @close-link-editor-dialog="closeLinkEditorDialog()"
- class="editor" style="max-width: unset" contenteditable="true" role="textbox" spellcheck="true"
- aria-placeholder="Enter some rich text..." data-lexical-editor="true"/>
- </div>
- </div>
- <x-filament-lexical-editor::dialogs/>
-
- </div>
-
- </div>
-
-
- </x-dynamic-component>
|