This repository has been archived by the owner on Dec 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 81
Image Tool: uploading failed because of ReferenceError: axios is not defined #5
Labels
bug
Something isn't working
Comments
Hi @Yurgeman, thank you very much for your attention to this plugin. I am very glad that you liked it. Yes, this is really a problem, I will try to take a look at it this weekend, unfortunately I will not be able to do it earlier. If you have a desire to help me in solving this error, then I can suggest you. |
This was referenced Feb 27, 2022
Closed
github-actions bot
pushed a commit
that referenced
this issue
Mar 13, 2022
# [2.0.0-beta.2](v2.0.0-beta.1...v2.0.0-beta.2) (2022-03-13) ### Bug Fixes * fixed the image tool. Now able to add images from the media library, and automatically shuts the media library window after saving. ([fb5a907](fb5a907)) * include label for the rich text editor field ([73187d7](73187d7)) * refactored to allow copy and paste images from another website ([3330250](3330250)), closes [#5](#5) * returned to making API route only be 'react-editorjs' ([ee9b747](ee9b747)) * solution for [#5](#5) axios ([1f2d9a7](1f2d9a7)) ### Features * add background to focused block & differentiate image tool caption ([a5d2b1b](a5d2b1b)) * add width, height, size, mime, responsive data to image tool ([e07548c](e07548c)), closes [#6](#6) [#16](#16) * enabled inline links ([ad11533](ad11533))
@Yurgeman |
github-actions bot
pushed a commit
that referenced
this issue
Mar 19, 2022
# [2.0.0](v1.5.1...v2.0.0) (2022-03-19) ### Bug Fixes * added /api/ to byUrl and byFile ([211c1f3](211c1f3)) * fixed the image tool. Now able to add images from the media library, and automatically shuts the media library window after saving. ([fb5a907](fb5a907)) * include label for the rich text editor field ([73187d7](73187d7)) * refactored to allow copy and paste images from another website ([3330250](3330250)), closes [#5](#5) * returned to making API route only be 'react-editorjs' ([ee9b747](ee9b747)) * solution for [#5](#5) axios ([1f2d9a7](1f2d9a7)) * feat!: updates to allow Strapi v4 functionality ([72b4913](72b4913)) ### Features * add background to focused block & differentiate image tool caption ([a5d2b1b](a5d2b1b)) * add width, height, size, mime, responsive data to image tool ([e07548c](e07548c)), closes [#6](#6) [#16](#16) * enabled inline links ([ad11533](ad11533)) ### BREAKING CHANGES * This update refactors the plugin to work in Strapi v4. This code will not work in Strapi v3. At this time, the Image tool is not functioning. The link tool works, but thumbnails are being blocked by Strapi 4's contentSecurityPolicy. The current workaround for this is to replace the 'strapi::security' default export in ./config/middlewares.js to the following code (do this at your own risk): "{ name: 'strapi::security', config: { contentSecurityPolicy: false }, }," I've yet to find a solution that can be baked into the plugin itself. I have also added "auth: false" to the routes config so that it is not necessary to give authenticated and public permissions to the plugin. This may need to be removed if it is seen as a security risk. Custom styles have been added to Wysiwyg/wrapper.js for headers (H1-H6) because Strapi resets styles and there is no styling for the plugin without them. I have updated editorjs to 2.23.2 and several other of the plugins (see package.json). I've also added @buffetjs/core and @buffetjs/styles to package.json because the library is not in Strapi now. I also removed "axios" because that library is in Strapi. I updated node to the following: "node": ">=10.16.0 <=16.x.x"
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
An error occurs when trying to insert text with pictures from the buffer or when dragging an image into the editor field:
Image Tool: uploading failed because of ReferenceError: axios is not defined
the download is successful only if you press + and select the file manually
The text was updated successfully, but these errors were encountered: