Make sure it works without javascript
This commit is contained in:
@@ -87,9 +87,8 @@ if (isset($_POST['code'])) {
|
|||||||
<body>
|
<body>
|
||||||
<div class="output"><?php echo $debugOutput ?></div>
|
<div class="output"><?php echo $debugOutput ?></div>
|
||||||
<form method="POST" action="">
|
<form method="POST" action="">
|
||||||
|
|
||||||
<div class="input">
|
<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">
|
<div class="statusbar">
|
||||||
<span class="position">Line: 1, Column: 1</span>
|
<span class="position">Line: 1, Column: 1</span>
|
||||||
<span class="copy">
|
<span class="copy">
|
||||||
|
|||||||
+8
-1
@@ -72,10 +72,17 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
initializeAce = function() {
|
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);
|
editor = ace.edit(options.editor);
|
||||||
|
|
||||||
// set mode
|
// set mode
|
||||||
var PhpMode = require("ace/mode/php").Mode;
|
PhpMode = require("ace/mode/php").Mode;
|
||||||
editor.getSession().setMode(new PhpMode());
|
editor.getSession().setMode(new PhpMode());
|
||||||
|
|
||||||
// tab size
|
// tab size
|
||||||
|
|||||||
Reference in New Issue
Block a user