You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/*** Create an instance*/consteditor=newEditorJS();/*** Destroy editor.*/editor.destroy();
all destroy methods of the tools should be invoked.
destroy
Method will be fired when Editor's instance is destroying with destroy API method. Clear your Tool's stuff here: remove event listeners, clear nodes cache and null variables and properties.
Docs: https://editorjs.io/tools-api#destroy
But, this does not happen.
Not sure if this is what was reported here already: #855.
Reproduce
Add the following to example/tools/header/src/index.js
staticgettoolbox(){// ...}destroy(){console.log('I was destroyed');}
Now run yarn build:dev and execute editor.destroy() in the console
Nothing happend, even though the console should now say I was destroyed.
The text was updated successfully, but these errors were encountered:
The Problem
According to the docs, when I do the following:
all
destroy
methods of the tools should be invoked.But, this does not happen.
Not sure if this is what was reported here already: #855.
Reproduce
example/tools/header/src/index.js
Now run
yarn build:dev
and executeeditor.destroy()
in the consoleNothing happend, even though the console should now say
I was destroyed
.The text was updated successfully, but these errors were encountered: