<html> 
<head>
    <title>Helene - Syntax Highlighting Editor in Javascript</title>
    <style>
      body {
      margin: 10px;
      padding: 0px;
      background-color: white;
      font-family: Verdana, helvetica, sans-serif;
      color: black;
      font:menu;
      }
      h3 {
      color: darkorange;
      }
      a {
      color: darkorange;
      text-decoration: none;
      }
      input, select{
      font:menu;
      }
    </style>
  </head>
</head>
  <body onload="init();">
    <?php 
    $teste=$_POST['myfile'];
echo $teste."<br><hr><br>";
    ?>
    <h3>Teste - Syntax Highlighting Editor in Javascript</h3>
    <form action index.php method="post">
    <input type="button" name="clear" value="Clear" onClick="editor.setContents('');">
    <input type="button" name="save" value="Save to Textarea" onClick="myfile.value = editor.getContents();">
    <input type="button" name="load" value="Load from Textarea" onClick="editor.setContents(myfile.value);">
    keybinding: <select name="keybinding" onChange="editor.setKeyBinding(keybinding.options[keybinding.selectedIndex].value); editor.inputLineEntry.focus();">
    <option value="default" selected>Default</option>
    <option value="joe">Joe</option>
    </select>
    autoindent: <select name="autoindent" onChange="editor.setAutoIndent(autoindent.options[autoindent.selectedIndex].value); editor.inputLineEntry.focus();">
    <option value="on" selected>On</option>
    <option value="off">Off</option>
    </select>
    <br>
    <?php echo $teste."<br><hr><br>"; ?>
    <textarea name="myfile" wrap="Off" style="width: 50%; height: 20%;"><?php echo $teste; ?></textarea>
    <input type="SUBMIT" value="submter">;
    </form>
    <iframe name="editor" src="editor.html" style="width: 50%; height: 70%;"></iframe>
    <script type="text/javascript">
    function init(){
      editor.setContents(
			 "teste\nteste"
			 );
    }
</script>
</body>
</html>
