1.0.1 • Published 4 years ago

codemirror-addon-indent-guide v1.0.1

Weekly downloads
30
License
MIT
Repository
github
Last release
4 years ago

codemirror-addon-indent-guide

Codemirror addon to include indentation guidelines.

How to use

  1. Install the library from npm
npm i codemirror-addon-indent-guide
  1. Import the module addon after importing codemirror module
import 'codemirror-addon-indent-guide';
  1. Setup indentGuide and indentUnit options when initializing codemirror editor. Example:
CodeMirror.fromTextArea(elem, {
  indentUnit: 2,
  indentGuide: true,
});
  1. Style it with some css using the classname cm-indent-guide. Example:
.cm-indent-guide {
  position: relative;
  border-left: 1px dotted #bbb;
}
1.0.1

4 years ago

1.0.0

4 years ago