Using only lightly modified versions of the footnote example and the menu package I would like to make the menu partly usable in the footnote’s sub-editor, namely for marks such as emphasis and strong.
Looking at how the menu runs commands, I suspect that connecting the would require swapping the default view: EditorView for the innerView: EditorView of the footnote plugin. As the latter changes whenever a footnote is clicked, this would require re-drawing the menu.
I understand that two plugins could exchange information via setMetaData or by accessing the later plugin’s state. Yet footnotes are not implemented as plugins.
I presume that it would also be possible to extend the MenuBarView.update() to check whether the caret is on a footnote, replace editorView and re-render. But that would require accessing the FootnoteView of the footnote node which is not possible as far as I understand.
Is there a way to expose the NodeView’s innerView to the menu bar?
Thank you for your help.