I’m trying to install Codemirror in Electron. While installing the modules work, the module itself doesn’t work, because Navigator and Document are null, so I guess I do a require of the codemirror module in the wrong place.
Right now, the main.js looks like this:
'use strict'; const electron = require('electron'); const codemirror = require("codemirror"); // <--- the codemirror change const app = electron.app; // Module to control application life.
But the codemirror uses the navigator and the document, for which I get an error: ReferenceError: document is not defined. So, my guess is: I include the codemirror module in the wrong place.
However, what I haven’t figured out yet, is: what is the correct place?