codemirror-wrapped-line-indent
v1.0.8
Published
A plugin for CodeMirror to handle wrapped line indentation
Downloads
329,064
Readme
Wrapped Line Indentation for CodeMirror
An extension for CodeMirror that adds indentation for wrapped lines.
Installation
Using npm:
npm install codemirror-wrapped-line-indent
Usage
import { EditorState } from '@codemirror/state';
import { EditorView } from '@codemirror/view';
import { wrappedLineIndent } from 'codemirror-wrapped-line-indent';
// ... your CodeMirror setup code ...
const state = EditorState.create({
// ... other state options ...
extensions: [
EditorView.lineWrapping,
wrappedLineIndent
]
});
const view = new EditorView({ state });