From 5c296c679e8c1af3888f28731f841d449a84a2df Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Jul 2017 13:42:07 +0200 Subject: [PATCH] Enhance source code editor --- htdocs/core/class/doleditor.class.php | 14 +++---- htdocs/langs/en_US/main.lang | 1 + htdocs/modulebuilder/index.php | 53 +++++++++++++-------------- htdocs/theme/eldy/style.css.php | 29 +++++++++++++++ 4 files changed, 62 insertions(+), 35 deletions(-) diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index 9a9f0387309..1fd57089a11 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -256,8 +256,10 @@ class DolEditor $format=(GETPOST('format','aZ09')?GETPOST('format','aZ09'):'php'); $out.= ''."\n"; - $out.= '
'; - $out.= '
';
+            $out.= '
$/'), array('<?php','?>'), $this->content); */
         	$out.= htmlentities($this->content);
         	$out.= '
'; @@ -268,18 +270,14 @@ class DolEditor $out.= ''."\n"; + print $out; + + $doleditor=new DolEditor($htmlname, $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%', ''); print $doleditor->Create(1, '', false); print '
'; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index b82fd096cfe..4baaf59d51e 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -3657,6 +3657,35 @@ a.cke_dialog_ui_button_ok span { } +/* ============================================================================== */ +/* ACE editor */ +/* ============================================================================== */ +.ace_editor { + border: 1px solid #ddd; + margin: 0; +} +#statusBar { + margin: 0; + padding: 0; + left: 0; + right: 0; + bottom: 0; + height: 20px; + background-color: #ebebeb; + /* color: gray; */ +} +.ace_status-indicator { + color: gray; + position: relative; + right: 0; + border-left: 1px solid; +} +.aceeditorstatusbar { + +} + + + /* ============================================================================== */ /* File upload */ /* ============================================================================== */