After studying the main wysiwyg editors decided to stop at summernote. Implemented a plugin for uploading images to the server and inserting them into the editor. Now I would like to delete the file from the server when deleting an image from the editor. The documentation, unfortunately, on the official site is very weak. You can use the removeMedia event when initializing the editor, but I would like to do this from the plugin. I realized that you can use this.events = {} in a plugin to override event handlers, but I can’t figure out how to access the image deletion event. I tried this:

this.events = { mediaRemove: function(){} } 

But the event does not work. How can this be done? Thank!

    0