tools for content editable elements. Inserting html, removing html, position caret, etc...
Thanks to tim down and his rangy module as most of the code is based on his work.
var contentEdit = require('content-edit');
var el = document.getElementById("content");
contentEdit.placeCaretAtStart(el);
make sure you have babel installed globally to compile the src
directory to the lib
directory.
npm install --global babel
npm run build
modify test.js for any tests
npm install
npm test
modify test.js for any tests
npm install
make sure you have webpack installed globally
npm install webpack -g
compile test.js to a bundle with webpack
webpack ./test/test.js ./test/test-bundle.js
open test.html to view the tests in the browser