Skip to content

assisrafael/codemirror-addon-indent-guide

Repository files navigation

codemirror-addon-indent-guide Lint

NPM

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;
}

About

Codemirror addon to include indent guidelines

Resources

License

Stars

Watchers

Forks

Packages

No packages published