1.0.4 • Published 10 years ago
range-limit v1.0.4
Range Limit
This module exposes a single function, limit(range, bounds), that limits the
Range to the contents of bounds, a Node.
Example
var limit = require('range-limit');
var article = document.getElementsByTagName('article');
var range = window.getSelection().getRangeAt(0);
limit(range, article);