(WIP) The lightest WYSIWYG cross-browser editor. (IE9+)
$ npm install --save editor-lite
const Editor = require('editor-lite');
const bar = document.getElementById('bar');
const item = document.getElementById('item');
const editor = new Editor(item, {
toolbar: bar,
onFocus: function () {
bar.classList.add('toolbar__active');
},
onBlur: function () {
bar.classList.remove('toolbar__active');
},
onKeyup: function (e, modifiers) {
console.log(modifiers);
//=> {alt: false, ctrl: false, meta: false, shift: false}
}
});
crickets
autoSave (int), save (fn), and onSave (fn)autoSync (int), sync (fn), and onSync (fn)API documentationThe term extension refers to an optional, accompanying file. Features should be opt-in, which is better than opt-out (from a lightweight POV).
MIT © Luke Edwards