style body min height 300px editor position absolute top 0 right 0 bottom 0 left 0 style script src https cdnjs cloudflare com ajax libs ace 1 9 6 ace js script div id editor var x 100 var text hello world console log x alert text div script var editor ace edit editor editor setTheme ace theme monokai editor getSession setMode ace mode javascript script Example to show how to highlight blocks in the ace editor style body min height 300px editor position absolute top 0 right 0 bottom 0 left 0 css to identify highlighting foo position absolute background rgba 100 200 100 0 5 z index 20 bar position absolute background rgba 100 100 200 0 5 z index 40 style script src https rawgithub com ajaxorg ace builds master src noconflict ace js script div id editor Simply dummy text of the printing and typesetting industry Lorem Ipsum has been the industry s standard dummy text ever since the 1500s when an unknown printer took a galley of type and scrambled it to make a type specimen book It has survived not only five centuries but also the leap into electronic typesetting remaining essentially unchanged It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum div script var editor ace edit editor var Range ace require ace range Range editor setReadOnly true editor setTheme ace theme github editor getSession setMode ace mode javascript setTimeout function editor gotoLine 154 Range 1 from line 0 number chars on the from line 10 to line 0 number chars on to line editor session addMarker new Range 1 5 1 20 foo line editor session addMarker new Range 3 5 8 8 bar text 100 script
t ever since the 1500s when an unknown printer took a galley of type and scrambled it to make a type specimen book It has survived not only five centuries but also the leap into electronic typesetting remaining essentially unchanged It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum div script var editor ace edit editor var Range ace require ace range Range editor setReadOnly true editor setTheme ace theme github editor getSession setMode ace mode javascript setTimeout function editor gotoLine 154 Range 1 from line 0 number chars on the from line 10 to line 0 number chars on to line editor session addMarker new Range 1 5 1 20 foo line editor session addMarker new Range 3 5 8 8 bar text 100 script