0.1.0 • Published 10 years ago
codemirror-typewriter-scrolling v0.1.0
codemirror-typewriter-scrolling
CodeMirror addon adding typwritter-scrolling feature
Installation
npm install codemirror-typewriter-scrolling
Usage
var editor = CodeMirror.fromTextArea(document.getElementById("editor"), {
lineNumbers: true,
mode: "markdown",
typewriterScrolling: true // setOption
});
// empty line
editor.setValue((new Array(100)).join("\n"));
or
use scrollSelectionToCenter
command.
editor.execCommand("scrollSelectionToCenter");
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
License
MIT
0.1.0
10 years ago