Find EditorView from PM editor's DOM node

I want to have more than one ProseMirror present in the DOM at one time. The most desirable way for my application to access each specific editor would be to locate its DOM node using jquery and navigate from there to the EditorView. I know that I can get to the NodeViewDesc via $(‘my jquery selector’)[0].pmViewDesc.node Is there any way to navigate from the NodeViewDesc to the EditorView so that I can work with the EditorState?

No, but you could set something up, like editor.dom.instance = editor, when you create the editor.

Thank you for your help. Your code is a bit nicer than what I’ve done so far which is this.$el[0].pm_editor = pm_editor This is fairly simple, but I’m not comfortable enough with the lifecycle management of either DOM elements or UI widgets in the Odoo platform into which I’m incorporating ProseMirror to be sure that adding references in this way won’t create a resource leak by preventing some GC process from collecting the editor. For at least the DOM portion can you provide any advice on that question?

Document Nodes in ProseMirror do not point to their parent. This helps to avoid memory leaks. The normal DOM nodes do, so code should not hang on to unused DOM nodes.