1.0.0 • Published 10 years ago
content-edit v1.0.0
content-edit
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);Development
make sure you have babel installed globally to compile the src directory to the lib directory.
npm install --global babel
npm run buildRunning Tests server side
modify test.js for any tests
npm install
npm testRunning Tests client side
modify test.js for any tests
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.jsopen test.html to view the tests in the browser
License
1.0.0
10 years ago