You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it should be possible to intercept urls, in case you use a CMS that provides the editorjs blocks. The idea is that a CMS might only give you a relative path to a given media resource, so the url would not be correct when rendering with this library.
I doesn't seem like there is a solution right now other than making a custom renderer.
Possible solution
A prop for a prefix for urls that starts with /
Or a prop for a function that can intercept the urls, example:
You can find a similar proposal in #52 but, as I described in the comment, I find there's an issue in regards to how (some?) CMSes are dealing with uploading data. If you look at the spec of Editor.js Image plugin you can find the following:
file - uploaded file data. Must contain an url field with full public path to the uploaded image. Also, can contain any additional fields you want to store. For example, width, height, id etc. All additional fields will be saved at the file object of output data.
Which clearly states that the full path must be provided, hence I think that, if you find any CMS providing Editor.js functionality but not dealing with the spec, you should open a report in their side. You can also link to this comment, if you find it useful.
If you find anything else we can help you with, please let me know.
Purpose
Description
I think it should be possible to intercept urls, in case you use a CMS that provides the editorjs blocks. The idea is that a CMS might only give you a relative path to a given media resource, so the url would not be correct when rendering with this library.
I doesn't seem like there is a solution right now other than making a custom renderer.
Possible solution
A prop for a prefix for urls that starts with
/
Or a prop for a function that can intercept the urls, example:
The text was updated successfully, but these errors were encountered: