Avascript-How-to-Detekt-IF-A-Word-Is-Highlighted

export const isHighlighting = () => {
  // detects mouse is highlighting a text
  return window.getSelection && window.getSelection().type === 'Range';
};
Borma