plugin views are good when the plugin needs to respond to view changes but not when a plugin want to change the view (for example a search and replace plugin doing a replace). How should such a case be handled ?
The only mechanism I see ATM is the view in PluginSpec
view(EditorView) → Object
When the plugin needs to interact with the editor view, or set something up in the DOM, use this field. The function will be called when the plugin’s state is associated with an editor view.
returns: Object
Should return an object with the following optional properties:
update(view: EditorView, prevState: EditorState)
Called whenever the view’s state is updated.
destroy()
Called when the view is destroyed or receives a state with different plugins.
How is this used ? any example ? how to handle a case when the plugin want to update the view in response to some user interaction on some widget the plugin created ? (ie S&R)
in that case update above is not called so how does the plugin get the view ?
Again apologies if this is a total misunderstanding …