I’m using a JS library (ProseMirror in this case) that provides a rich editor, and a way to embed arbitrary DOM elements into it. As a simple example, check out dinosaurs embedded in the document: ProseMirror dino example
I’m going to make a Halogen component wrapping ProseMirror, which is easy enough, but I want the ability to embed an arbitrary Halogen component in the document, while still basically behaving the same: I want it to be updated as usual, that queries and raises work as usual, etc.
Is there a standard-ish way to achieve this?
I think if I move the DOM element—I.e change its parent—manually after it’s created, that’ll cause trouble.
An idea I had was to create a kind of “proxy” and make a fresh call to runUI for each child, and the proxy would forward queries and inputs up and down, or something like that.
Anyone done something similar?