I have a simple textarea (HTML element) with some code in R or Python language (picture 1). I need to highlight the R or Python code (comment, keyword, string, number etc) with line number (picture 2). And also it must be able to perform basic text editor such as copy, paste, select all, undo, redo, find, replace, go to line etc.
To convert from picture 1 to picture 2, please use lightweight library in Javascript, HTML5, CSS, JQuery 3.2.1 and Bootstrap v4.3.1.