New course! Every coder should learn Generative AI!
Try a free lesson+ 2
// I was too searching for similar answer years ago, but found you we can't control regular html textarea but there are other ways of working
//External link
https://stackoverflow.com/questions/1619167/textarea-that-can-do-syntax-highlighting-on-the-fly