code: function isWithin(container, sel) {
  	sel = sel || getSelection();
  	return container.contains(sel.anchorNode) && container.contains(sel.focusNode);
  }
docs: Is the Selection within given container Node?
  @param {Node} container  The container node
  @param {Selection} sel
  @return {Boolean}