From 6797e7cb7e762dfcde96233df987783a4fff2eaa Mon Sep 17 00:00:00 2001 From: reliberate Date: Thu, 17 Mar 2016 17:33:33 -0600 Subject: [PATCH] Command: Enable PHP syntax highlighting without opening/closing tags. --- app/exec/exec.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/exec/exec.php b/app/exec/exec.php index 299ca2a07e..437a321e8e 100644 --- a/app/exec/exec.php +++ b/app/exec/exec.php @@ -106,7 +106,7 @@ else { break; case 'php': document.getElementById('description').innerHTML = ""; - editor.getSession().setMode('ace/mode/php'); + editor.getSession().setMode({path:'ace/mode/php', inline:true}); //highlight without opening tag $('#mode option[value=php]').prop('selected',true); break; case 'shell': @@ -196,7 +196,7 @@ else { - $label) { + if ($setting_preview == 'true') { + $preview = "onmouseover=\"editor.getSession().setMode(".(($value == 'php') ? "{path:'ace/mode/php', inline:true}" : "'ace/mode/' + this.value").");\""; + } $selected = ($value == $mode) ? 'selected' : null; echo "\n"; } @@ -283,7 +285,7 @@ else { -
+
"; echo " \n"; @@ -311,6 +313,7 @@ else { highlightGutterLine: false, useSoftTabs: false }); + editor.getSession().setMode({path:'ace/mode/php', inline:true}); document.getElementById('editor').style.fontSize=''; focus_editor(); @@ -345,7 +348,6 @@ else { eval($cmd); $result = ob_get_contents(); ob_end_clean(); - $result = htmlentities($result); } break; case 'switch':