src/js/extensions/mark/viewerMarkerHelper.js
function getRange() {
  const selection = window.getSelection();
  let range;

  if (selection && selection.rangeCount) {
    range = selection.getRangeAt(0).cloneRange();
  } else {
    range = document.createRange();
    range.selectNodeContents(this.preview.$el[0]);
    range.collapse(true);
  }

  return range;
}
function getRange() {
  const selection = window.getSelection();
  let range;

  if (selection && selection.rangeCount) {
    range = selection.getRangeAt(0).cloneRange();
  } else {
    range = document.createRange();
    range.selectNodeContents(this.preview.$el[0]);
    range.collapse(true);
  }

  return range;
}
function getRange ( ) { const selection = window . getSelection ( ) ; let range ; if ( selection && selection . rangeCount ) { range = selection . getRangeAt ( 0 ) . cloneRange ( ) ; } else { range = document . createRange ( ) ; range . selectNodeContents ( this . preview . $el [ 0 ] ) ; range . collapse ( true ) ; } return range ; }
getRange
get current range
@returns {Range}
@ignore
getRange get current range