codemirror-addon-indent-guide
1.0.1 • Public • Published 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
indentGuide
and indentUnit
options 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;
}
Versions
Current Tags
Version | Downloads (Last 7 Days) | Tag |
---|
1.0.1 | 143 | latest |
Version History
Version | Downloads (Last 7 Days) | Published |
---|
1.0.1 | 143 | |
1.0.0 | 0 | |
Package Sidebar
Install
npm i codemirror-addon-indent-guide
Weekly Downloads