Classeur ContentEditable engine
The main purpose is to have a lightweight layer on top of a built-in contenteditable text field, to provide the following features:
- Syntax highlighting
- Selection getter, setter, change listener, cursor coordinates...
- Custom undo/redo behaviors
- Custom keystrokes
The benefits over ACE/CodeMirror are:
- Pluggable syntax highlighting (works beautifully with Prism.js)
- Browser built-in spellchecking
- Mobile device support
cledit relies on browsers built-in MutationObserver API. IE11+ is required.
cledit uses Google's DiffMatchPatch library as a dependency.
npm install cledit --save
A usage example can be found in the