Skip to content

Instantly share code, notes, and snippets.

@tung-dang
Created June 21, 2015 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tung-dang/a8facedeb6bfdb0846b7 to your computer and use it in GitHub Desktop.
Save tung-dang/a8facedeb6bfdb0846b7 to your computer and use it in GitHub Desktop.
Editor
var selectFromElementToElement = function(startSelection, endSelection) {
rng = dom.createRng();
rng.setStartBefore(startSelection);
rng.setEndAfter(endSelection);
sel.setRng(rng);
ed.nodeChanged();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment