1.0.1 • Published 5 years ago
codemirror-addon-indent-guide v1.0.1
codemirror-addon-indent-guide
Codemirror addon to include indentation guidelines.
How to use
- Install the library from npm
npm i codemirror-addon-indent-guide- Import the module addon after importing codemirror module
import 'codemirror-addon-indent-guide';- Setup
indentGuideandindentUnitoptions when initializing codemirror editor. Example:
CodeMirror.fromTextArea(elem, {
indentUnit: 2,
indentGuide: true,
});- Style it with some css using the classname
cm-indent-guide. Example:
.cm-indent-guide {
position: relative;
border-left: 1px dotted #bbb;
}