Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.container = element;
this.caret = new Caret(content);
// fix keyboard behavior
var k = require('k-format')(content, {caret: this.caret});
setupToolbar(this);
var buttons = toolbar.getElementsByTagName('button');
events.bind(content, 'click', refreshStatus(buttons));
events.bind(content, 'keyup', refreshStatus(buttons));
events.bind(toolbar, 'click', refreshStatus(buttons));
k('super+b', format.bold);
k('super+i', format.italic);
k("super+'", format.blockquote);
k('super+l', function(e) {
e.preventDefault();
if (!k.alt) {
format.ul();
} else {
format.ol();
}
});
}
setTimeout(function() {
format.blockquote();
format.p();
}, 1);
return true;