0

I am trying to find a way to let you bold the text that is highlighted. I have no idea on how to do this. Any help?

/* my code so far: */ window.highlightedText.bold();
epascarello
  • 204,599
  • 20
  • 195
  • 236
Kevin
  • 5
  • 3
  • Where is this text that you are trying to bold? That is the first question. – epascarello Feb 10 '22 at 13:37
  • 1
    https://developer.mozilla.org/en-US/docs/Web/API/Window/getSelection – epascarello Feb 10 '22 at 13:37
  • Related: [How can I dynamically highlight strings on a web page?](/a/32167527/4642212). – Sebastian Simon Feb 10 '22 at 13:38
  • Relevant questions: [Get the Highlighted/Selected text](https://stackoverflow.com/questions/5379120/get-the-highlighted-selected-text), [Bold part of String](https://stackoverflow.com/questions/29896907/bold-part-of-string) – DBS Feb 10 '22 at 13:38

0 Answers0