Getting and modifying the ProseMirror instance

Hi there,

We are developing a Chrome extension for a specific need, that loads some jQuery and AngularJS logic. The extension aims to modify the content of a prosemirror editor loaded on the page, more precisely the react implementation of ProseMirror (the @atlaskit/editor).

My JS code runs in the context of the page, allowing me to access all the JS scopes and the DOM, but I don’t find a way to get the ProseMirror’s instance so I can use the states logic or other solution, to properly modify the content. Currently, I’m pointing directly to the DOM element of the editor content, I can apply simple editing operations like $('.ProseMirror my_selector').html('...') or $('.ProseMirror my_selector').addClass('...'), but the modification of the DOM is simply rejected. Or may be is there is another easy way to modify the Editor content ?

Thank you in advance for your precious help.

This does not exist—if the code that created the instance isn’t sharing it with you, there’s no way to access it.