سؤال

Is there a way to trigger an event when the user deletes an object in tinyMCE?

I'm trying to erase uploaded images from a cache folder when the users deletes an image from the tinyMCE instance. So if he uploads images and then deletes it, an ajax action deletes the file on the uploaded folder. This way I have a cleaner cache folder.

هل كانت مفيدة؟

المحلول

Yes, this is possible. You could catch the DOMNodeRemoved event and check for the node that got deleted. In case it is an image you do your cache magic.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top