Adding minimap functionality to CodeMirror
NOTE: This project is no longer maintained. The code is based on an earlier version of CodeMirror and breaks on the demo page.
Reference minimap.js
<script type="text/javascript" src="minimap.js"></script>
then create a minimap instance
var miniMapControl = new MiniMap();
You can optionally pass in the following parameters:
To update the minimap when changes occur in the CodeMirror editor simply add this line after the instance is created:
editor.setOption("onChange",miniMapControl.mirrorContent);
Please Fork&Pull. I'm sure that there is a lot that could still be done to improve/customize the control.
I'm sure this could be adapted to non-code mirror fields.