Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mortezaashrafi's avatar

filamentphp custom field problems

Hello, I am creating a custom field in filamentphp, but I have some problems

1- The problem is in ->reorderableWithButtons() and moving items, the data inside tiny is deleted after changes

2- Also, it is said to use state to transfer data in the tutorials, but it didn't work for me and I used x-model="state"

My Code < script > src="https://cdn.tiny.cloud/1/{{env('TINYMCE_API_KEY')}}/tinymce/6/tinymce.min.js" </ script >

< x-dynamic-component :component="$getFieldWrapperView()" :field="$field" class="relative z-0"> < x-filament::input.wrapper class="overflow-hidden" wire:ignore x-data="{ state: $wire.$entangle('{{ $getStatePath() }}') }" x-init=" tinymce.init({ target: $refs.tinymce, selector: $refs.tinymce, setup: function (editor) { editor.setContent(state); editor.on('change', function () { state = editor.getContent(); }); } }); "> < textarea x-model="state" x-ref="tinymce" ></ textarea > </ x-filament::input.wrapper > </ x-dynamic-component >

0 likes
1 reply

Please or to participate in this conversation.