I am attempting to insert iframes (more specifically Electron Webviews) inside of a CodeMirror editor through the
markText method and the
replacedWith option. The problem I am running into is that iframes are reloaded whenever they are either put in or moved in the DOM (and there is no way around that).
Since the iframes I insert in the editor take up the full line, I am trying to prevent these iframes from reloading by preventing the lines from re-rendering.
One way of doing that is by never calling the
refresh method, but I am also saving the iframes' state in their marked text. Although this text is never visible to the user, whenever it is changed it re-renders the entire line, thus reloading the iframe.
So is there any way to prevent some lines from re-rendering?
I realize that this is an issue very specific to my use-case and thus I do not think anything should be added to CodeMirror to allow this functionality. Instead, if there is no way around this issue, I may fork CodeMirror and add in what I need. In this case, could anyone guide me towards the specific sections of the codes that would be of interest to me and how I could modify CodeMirror to achieve this?
Thank you in advance