Editor save event not successful
Hi, been trying to save edited information on my site but the tick or X that appears in the demo in the middle of the page is not showing on my site plus the gears that replace the pencil icon on editing is not appearing...could it be something in my editor.js file that is making it so? File pasted below editor.txt
Make sure, the backend which receives xhr.open('POST', '/x/save-page‘) responds with the HTTP status code 200 OK, since your editor recognizes only this one. Other valid status codes may be 201 Created, 202 Accepted and 204 No Content. The last one sounds strange, but it means that the POST data has been received and acted upon, but only did not produce any result (content) which would have been necessary to return to the client.
In addition to 200, my backend responds with 204, 201 and 304 if everything went OK, or with 400, 404 and 500 otherwise.
Hi, I have changed the line xhr.open('POST', '/x/save-page‘) to xhr.open('POST', 'index.html‘) and the POST returns 200 but the changes have not been effected still
The Status is 200 OK but no changes committed to the file when I reload the page it still shows the same
Posting to the index.html file likely means your changes aren't saved as I'm assuming index.html is just responsible for displaying the content of the home page not saving them. What doesn't you /x/save-page view respond with?