Advertisement
Guest User

Untitled

a guest
Apr 30th, 2014
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.92 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3.     <head>
  4.         <script src="http://cdnjs.cloudflare.com/ajax/libs/ace/1.1.3/ace.js"></script>
  5.         <style type="text/css" media="screen">
  6.             #editor {
  7.                 width: 100%;
  8.                 height: 100%;
  9.             }
  10.             #container
  11.             {
  12.                 position: absolute;
  13.                 top: 50;
  14.                 left: 50;
  15.                 width: 50%;
  16.                 height: 50%;
  17.             }
  18.         </style>
  19.     </head>
  20.     <body>
  21.         <form action="http://71.238.153.166/lua.lua" method="post" onsubmit="onSubmit()">
  22.             <input type="hidden" id="htext" name="text"/>
  23.             <div id="container">
  24.                 <div id="editor">print("Hello World")</div><br/>
  25.                 <input type="submit" value="Submit"/>
  26.             </div>
  27.            
  28.            
  29.         </form>
  30.        
  31.         <script>
  32.             var editor = ace.edit("editor");
  33.             editor.setTheme("ace/theme/eclipse");
  34.             editor.getSession().setMode("ace/mode/lua");
  35.            
  36.            
  37.             function onSubmit()
  38.             {
  39.                 document.getElementById('htext').value = editor.getValue();
  40.             }
  41.         </script>
  42.     </body>
  43. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement