melishev / strapi-plugin-react-editorjs

📝 Plugin for Strapi Headless CMS, hiding the standard WYSIWYG editor on Editor.js
https://www.npmjs.com/package/strapi-plugin-react-editorjs
MIT License
170 stars 77 forks source link

Broken Link / Embed in Strapi EditorJS #43

Closed fxmb closed 2 years ago

fxmb commented 2 years ago

When I try to embed a Link in Strapi it seems that the feature is broken... The link is red and a message pops up saying Couldn't fetch the link data in the Strapi Editor. Any idea how to over come this?

image

Thanks for any help or pointers!

melishev commented 2 years ago

@franzbewerunge did you follow the installation guide?

fxmb commented 2 years ago

Yes I did. Is there anything particular I need to watch out for? We are hosting on DO and are having no major problems until now... But for somehow the link previews / embedding does not work

melishev commented 2 years ago

what version of strapi are you using?

Kvintus commented 2 years ago

Hi so I've been looking into this and it seems that to fetch the data the editor makes a request to api/react-editorjs/link however the actual endpoint is at /api/editorjs/link.

So even setting the security middleware won't help since the endpoint is setup incorrectly.

This is the request made by the editor: Screenshot 2022-05-04 at 23 15 06

And this is the very same request, with changed endpoint: Screenshot 2022-05-04 at 23 15 27

If you need to fix this quickly you can follow the instructions on how to extend and develop the plugin and in the /admin/src/config/customTools.js you can do this Screenshot 2022-05-04 at 23 38 12

fxmb commented 2 years ago

@Kvintus Thanks so much for identifying the issue here! Truly appreciated!

Is there a timeline for the fix? 🙏

melishev commented 2 years ago

@Kvintus @nhvu1988 - thank you for your input on the project. Could you read the PR #44 and give your comments?

nhvu1988 commented 2 years ago

@Kvintus @melishev I have tested the PR and it fixes this issue as well

image

melishev commented 2 years ago

Well, the last PR #44 should solve your problem, thanks for the input - @nhvu1988