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
or 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