awcodes / filament-tiptap-editor

A Rich Text Editor plugin for Filament Forms.
MIT License
272 stars 73 forks source link

Error when embedding YouTube or Vimeo videos #195

Closed danielbehrendt closed 10 months ago

danielbehrendt commented 10 months ago

Filament Version

v3.0.93

Plugin Version

v3.0.4

PHP Version

PHP 8.2.11

Problem description

When using the "Insert Media" function to add an video it gets inserted but after reloading the form there's an error:

Call to undefined method DOMText::getAttribute()

Maybe it's caused by the encoded iframe:

<div data-vimeo-video="" class="responsive">&lt;iframe src=&quot;https://player.vimeo.com/video/12345?rel=0&amp;amp;&quot; width=&quot;1600&quot; height=&quot;900&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; fullscreen; picture-in-picture&quot; style=&quot;aspect-ratio: 16 / 9; width: 100%; height: auto;&quot; data-aspect-width=&quot;16&quot; data-aspect-height=&quot;9&quot;&gt;&lt;/iframe&gt;</div>

Expected behavior

Error should not appear :)

Steps to reproduce

Insert any video by URL from YouTube or Vimeo.

Reproduction repository

No response

Relevant log output

No response

awcodes commented 10 months ago

I'm not seeing any errors with the 'insert video' button.

Feel free to reopen if you can provide a reproduction.