range-limit
1.0.4 • Public • Published 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);
/range-limit/
//
Package Sidebar
Install
Weekly Downloads