Welcome to Inkdrop! These docs give an overview of how Inkdrop works, and are meant to be a reference for plugin developers.
The Inkdrop Forum is the place to discuss anything and everything Inkdrop related with the entire Inkdrop community. If you have problems or are looking for help, this is your place.
You can access the instance of CodeMirror like this:
You can also get a CodeMirror class object by doing
CodeMirror comes with a bunch of addons available to use.
But you can't require them like
require('codemirror/addons/fold/foldcode.js') because it is not in the search path.
To do so, add a path to the app's
node_modules to your
require statements as following:
const app = require('electron').remote.app; const modulePath = app.getAppPath() + '/node_modules/' require(modulePath + 'codemirror/addon/fold/foldcode.js'); require(modulePath + 'codemirror/addon/fold/foldgutter.js'); require(modulePath + 'codemirror/addon/fold/markdown-fold.js');
The source of these docs is here on GitHub. If you see a way these docs can be improved, please fork us!