Rubric Editor API Methods
destroy()
Permanently tears down the editor instance by unmounting it from the DOM, removing all registered event listeners, and stopping further event emissions.
You would want to use this method when you are permanently finished with the editor, for example, when you tear down the component in your application and will not reattach the instance.
Note Unlike the detach method, which leaves the instance live so you can reattach it, and the reset method, which clears the current content but keeps the instance alive, destroy is terminal and the instance is not reusable after you call it. To continue, create a new instance with the createEditor method.
Examples
await editor.destroy();
Arguments
None.
Return value
Type Promise
Resolves when the editor is destroyed.