CKEditor 5 Image Upload Issue - Receiving HTML Instead of JSON Response #127887
Replies: 1 comment
-
Consegui resolver sozinha |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Body
I am using CKEditor 5, but I am facing issues when saving images. When I try to save, only the text gets saved and the images do not. The image is stored in the format "data
/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZ4AAALXCAYAAAC9wyY2AAAABHNCSVQICAgIfAhkiAAAABl0RVh0U29mdHdhcmUAZ25vbWUt", but I need to save the image on my server and have the URL of the uploaded image returned by the server, replacing the base64 image location in the editor's content.
My file structure is as follows:
MyUploadAdapter.js
MyCustomUploadAdapterPlugin.js
upload.php
index
Please note that I am not using Node.js, only PHP and JavaScript. I have debugged the code, and what I receive at const response = JSON.parse(xhr.responseText); is just the HTML of my own page.
Remember that I am a beginner in programming, so I do not have much practice and find some things difficult.
Could someone help me fix the image upload issue? Thank you in advance!
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions