mobiledoc-kit icon indicating copy to clipboard operation
mobiledoc-kit copied to clipboard

[Question] How to determine the reason for a card teardown?

Open hpohlmeyer opened this issue 8 years ago • 0 comments

Is there a way to determine the reason, why a card is torn down?

The reason I am asking is, that I am working on an image card, that copies the image to another location when used. If the card is torn down by deleting it in the editor, I want to remove the copied image, but if the whole editor is torn down due to a switch to another post, I don’t want to delete the copied image.

Essentially I need to know in the env.onTeardown callback, if the teardown is caused by deleting the section, or by the editor.destroy function.

hpohlmeyer avatar Nov 30 '17 15:11 hpohlmeyer