Hm. Yeah I still need to try that. My concern is that I'm unsure if CodeMirror can act a normal input field. (In order to get it's contents sent by Joplin).
Anyways,
I have another issue though that's stopping me, For some reason when Joplin is loading webview scripts, it somehow doesn't load them in correct order.
If I do this
await dialogs.addScript(diffViewDialog, './UI/codemirror/lib/codemirror.js');
await dialogs.addScript(diffViewDialog, './UI/codemirror/addon/merge/merge.js');
I will get an error that CodeMirror doesn't exist even though it's right there, as if it tried to load all scripts at once on dialog open.
The only way I got it to work is by delaying the call await dialogs.addScript(diffViewDialog, './UI/codemirror/addon/merge/merge.js'); until after the open function is called. (So that the view would be loaded already). But this solution isn't practical, I have to assume it's just a bug in Joplin that can be fixed ?