From fda54ab5a277107604030a3e59ebaaeca76367be Mon Sep 17 00:00:00 2001 From: Marco Dickert Date: Tue, 20 Mar 2018 17:26:50 +0100 Subject: [PATCH] Added ability to include ace extensions, like syntax highlighting and other features --- .gitattributes | 1 + build/libifm.php | 141 ++++++++++++++------ compiler.php | 50 +++++-- ifm.php | 141 ++++++++++++++------ src/ifm.js | 48 +++++-- src/includes/ace.js | 2 +- src/includes/ace/.gitignore | 2 + src/main.php | 31 +++-- src/templates/modal.file_editoroptions.html | 7 + 9 files changed, 305 insertions(+), 118 deletions(-) create mode 100644 src/includes/ace/.gitignore diff --git a/.gitattributes b/.gitattributes index 7635ed6..50b6f6d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ ifm.php -diff ifm.min.php -diff build/* -diff +src/includes/ace.js -diff diff --git a/build/libifm.php b/build/libifm.php index ff72e41..0ae2247 100644 --- a/build/libifm.php +++ b/build/libifm.php @@ -104,6 +104,12 @@ class IFM { // load config from passed array $this->config = array_merge( $this->config, $config ); + // get list of ace includes + $this->config['ace_includes'] = <<<'f00bar' +|ext-modelist|mode-html|mode-html_elixir|mode-html_ruby|mode-perl|mode-php +f00bar; + + // templates $templates = array(); $templates['app'] = <<<'f00bar'