awcodes / filament-tiptap-editor

A Rich Text Editor plugin for Filament Forms.
MIT License
297 stars 86 forks source link

Filament TiptapEditor in a Fabricator Block not working. #329

Closed pMatt1988 closed 9 months ago

pMatt1988 commented 9 months ago

Filament Version

3.2.30

Plugin Version

3.2.22

PHP Version

8.2

Problem description

Using TiptapEditor from within a Fabricator (3.4.10) block causes tiptap editor to error out in the console as well as not display correctly on the page.

image

Expected behavior

I would expect the TiptapEditor to behave as if it were placed directly in a Filament Resource form.

Steps to reproduce

Install Filament Fabricator, install Filament TiptapEditor. Create a custom Fabricator Block, include the TiptapEditor with any configuration within the custom blocks form schema.

Reproduction repository

No response

Relevant log output

Uncaught SyntaxError: Unexpected number
    at new AsyncFunction (<anonymous>)
    at safeAsyncFunction (livewire.js?id=a27c4ca2:1286:21)
    at generateFunctionFromString (livewire.js?id=a27c4ca2:1296:16)
    at generateEvaluatorFromString (livewire.js?id=a27c4ca2:1301:16)
    at normalEvaluator (livewire.js?id=a27c4ca2:1266:111)
    at evaluateLater (livewire.js?id=a27c4ca2:1256:12)
    at evaluate (livewire.js?id=a27c4ca2:1252:5)
    at Function.<anonymous> (livewire.js?id=a27c4ca2:3502:17)
    at flushHandlers (livewire.js?id=a27c4ca2:1390:48)
    at stopDeferring (livewire.js?id=a27c4ca2:1395:7)

Uncaught ReferenceError: editor is not defined
    at [Alpine] { '!bg-gray-500/30': editor().isActive('paragraph', updatedAt) && editor().isFocused } (eval at safeAsyncFunction (https://empawtify.test/livewire/livewire.js?id=a27c4ca2:1286:21), <anonymous>:3:95)
    at livewire.js?id=a27c4ca2:1308:23
    at tryCatch (livewire.js?id=a27c4ca2:1228:14)
    at livewire.js?id=a27c4ca2:3475:19
    at reactiveEffect (livewire.js?id=a27c4ca2:2402:18)
    at Object.effect2 [as effect] (livewire.js?id=a27c4ca2:2377:7)
    at effect (livewire.js?id=a27c4ca2:771:35)
    at wrappedEffect (livewire.js?id=a27c4ca2:787:29)
    at Function.handler2 (livewire.js?id=a27c4ca2:3475:5)
    at flushHandlers (livewire.js?id=a27c4ca2:1390:48)
awcodes commented 9 months ago

I haven't worked with Fabricator but seeing as the editor works both in forms and the native Builder component of Filament, this might be an issue with Fabricator.

If you can provide a reproduction repo, I'm happy to investigate further when I have some time.

For now though, I am going to close this.

Feel free to reopen when you can provide a reproduction repo.

chrismcintosh commented 9 months ago

I'm also seeing this problem. Can't use basic features like bold and underline from the toolbar. I'm unsure of how to reproduce.