awcodes / filament-tiptap-editor

A Rich Text Editor plugin for Filament Forms.
MIT License
249 stars 64 forks source link

Tiptap Editor Failing In Modal #414

Closed Nathan269 closed 3 hours ago

Nathan269 commented 2 weeks ago

Filament Version

v3.2.91

Plugin Version

v3.4.0

PHP Version

PHP 8.3.8

Problem description

The tiptap editor is failing to load the tools and also doesn't allow for the text within the editor to be edited.

Expected behavior

The editor to display the expected tools and for me to be able to make changes to the text within the editor.

Steps to reproduce

I'm using the kanban board filament package which when you click on an item within the kanban board, a modal pops up and contains a form. This is the code for my form:

protected function getEditModalFormSchema(?int $recordId): array
    {
        $job = Job::find($recordId);
        $isDisabled = false;

        if (Gate::denies('update', $job)) {
            $isDisabled = true;
        }

        return array_merge(
            [
                Placeholder::make('no_permission')
                    ->hidden(! $isDisabled)
                    ->content('You do not have permission to edit this job.'),
            ],
            JobsForm::make($isDisabled)
        );
    }

This issue is ongoing from this previous issue here. I left a comment near the bottom of the linked issue with an image of how my editor looks. My output has changed slightly since the update and now looks like this:

Screenshot 2024-06-17 at 12 15 59

Previously, my text never even displayed within the editor. If I double click on any text, the tooltips to appear like so:

Screenshot 2024-06-17 at 12 16 51

I CANT delete or add any text at all.

Reproduction repository

No response

Relevant log output

No errors are logged within the console.
awcodes commented 2 weeks ago

Hmm. Hard to say. I've never worked with that plugin before so have no way of knowing what could be happening. Editor is working normally and as expected in my demo app.

Make sure you also run 'php artisan filament:assets' in case there's any caching issues with the assets.

Nathan269 commented 2 weeks ago

No luck with running 'php artisan filament:assets'. No worries though, I'll just switch to RichEditor for this project for now and if I have more time in the future, I'll dive deeper into what is causing the issue. Thanks for the quick response!

thesubhendu commented 2 weeks ago

Make sure Grammarly extension in disabled. I have seen it causing issue in modal.