Make sure it works without javascript

master
Jordi Boggiano 13 years ago
parent d5f1c61a60
commit d9aca6be76
  1. 3
      index.php
  2. 9
      php-console.js

@ -87,9 +87,8 @@ if (isset($_POST['code'])) {
<body>
<div class="output"><?php echo $debugOutput ?></div>
<form method="POST" action="">
<div class="input">
<div class="editor" id="editor"><?php echo (isset($_POST['code']) ? htmlentities($_POST['code'], ENT_QUOTES, 'UTF-8') : null) ?></div>
<textarea class="editor" id="editor" name="code"><?php echo (isset($_POST['code']) ? htmlentities($_POST['code'], ENT_QUOTES, 'UTF-8') : null) ?></textarea>
<div class="statusbar">
<span class="position">Line: 1, Column: 1</span>
<span class="copy">

@ -72,10 +72,17 @@
};
initializeAce = function() {
var PhpMode, code;
code = $('#' + options.editor).text();
$('#' + options.editor)
.replaceWith('<div id="'+options.editor+'" class="'+options.editor+'"></div>')
.text(code);
editor = ace.edit(options.editor);
// set mode
var PhpMode = require("ace/mode/php").Mode;
PhpMode = require("ace/mode/php").Mode;
editor.getSession().setMode(new PhpMode());
// tab size

Loading…
Cancel
Save