awcodes / filament-tiptap-editor

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

Image path in editor is broken after submitting Edit Media modal #425

Closed kg-emid closed 4 months ago

kg-emid commented 4 months ago

Filament Version

v3.2.92

Plugin Version

v3.4.3

PHP Version

PHP 8.3.7

Problem description

After submitting Edit Media modal on image, the image is broken inside tiptap: https://github.com/awcodes/filament-tiptap-editor/assets/107583511/64e67c02-3dbc-4ed6-982c-546ca1e183f4

After editing existing image the path is broken (no "storage" in url) All configurations are default

Dumped state of EditMediaAction: image

The preview image inside Edit modal is still ok

Expected behavior

The image should not be broken

Steps to reproduce

  1. Click on "Insert / Edit media" button
  2. Upload an image
  3. Submit modal
  4. Click on "Edit Media" button in tooltip of uploaded image
  5. Submit modal without any changes

Reproduction repository

No response

Relevant log output

No response

awcodes commented 4 months ago

Not sure what is happening. Can you provide a reproduction repo? I can't replicate this issue.

https://github.com/awcodes/filament-tiptap-editor/assets/3596800/ca0c3b92-7419-46a0-9dba-f1bc88cacc4f

kg-emid commented 4 months ago

Hey @awcodes , the reproduction repo: https://github.com/kg-emid/filament-tiptap-broken-image

awcodes commented 4 months ago

Thank you. Will look at it as soon as I can.

awcodes commented 4 months ago

I'm still not able to reproduce the issue with your reproduction issue.

https://github.com/user-attachments/assets/ca35d956-6d3d-45e8-a1ee-2f461f7ac1c3

ALSHIHAB commented 4 months ago

I am facing the same issue

ALSHIHAB commented 4 months ago

I have solved the problem by updating the package config file and making 'use_relative_paths' => false,