What is the best way to cleanup EditorView if you want to reuse it and load new document into the same Editor Instance ? The destroy Method seems to cleanup everything . I had some problems with old document’s customnodeviews appearing in new document . So i did destroy the old EditorView and created a new one , this solved my problem but bit awkward to do it in componentDidUpdate . So i just wanted to check.
Creating a new state and setting your view to it with updateState
should work. If both states have identical nodes and use the same node view then yes, the editor may keep those node views around—they are tied to the node’s structure, not its identity.