Avascript-How-to-Detect-af-a-Word-Is-highlightled

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