From e106c8184a1f8b1c960f74dd281d19e1c2261404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20DECOOL?= Date: Mon, 19 Jan 2015 18:16:01 +0100 Subject: [PATCH 1/2] Allow to define custom editor template renderer --- Controller/ElFinderController.php | 15 +++++++++++++++ DependencyInjection/Configuration.php | 1 + 2 files changed, 16 insertions(+) diff --git a/Controller/ElFinderController.php b/Controller/ElFinderController.php index 518af0d..fa364a9 100644 --- a/Controller/ElFinderController.php +++ b/Controller/ElFinderController.php @@ -1,6 +1,7 @@ $locale, + 'fullscreen' => $fullscreen, + 'includeAssets' => $includeAssets, + 'instance' => $instance, + 'relative_path' => $relativePath + ); + return $result; case 'ckeditor': $result['template'] = 'FMElfinderBundle:Elfinder:ckeditor.html.twig'; $result['params'] = array( diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 5f1d3b3..860bf03 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -34,6 +34,7 @@ public function getConfigTreeBuilder() ->children() ->scalarNode('locale')->defaultNull()->end() ->scalarNode('editor')->defaultValue('simple')->end() + ->scalarNode('editor_template')->defaultNull()->end() ->booleanNode('fullscreen')->defaultTrue()->end() ->booleanNode('include_assets')->defaultTrue()->end() ->scalarNode('tinymce_popup_path')->defaultValue('')->end() From 50e9a1707e171bf52144674e8438a107faf0ff40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20DECOOL?= Date: Mon, 19 Jan 2015 18:16:08 +0100 Subject: [PATCH 2/2] Update README --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 58386f6..157bbe2 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ fm_elfinder: instances: default: locale: %locale% # defaults to current request locale - editor: ckeditor # other choices are tinymce or simple, and form + editor: ckeditor # other choices are tinymce, simple, form or custom fullscreen: true # defaults true, applies to simple and ckeditor editors include_assets: true # disable if you want to handle loading of the javascript and css assets yourself compression: false # enable if you configured the uglifycss and uglifyjs2 assetic filters and want compression @@ -158,8 +158,9 @@ fm_elfinder: * driver - can be LocalFileSystem, FTP or MySQL2, currently supported only LocalFileSystem, default is LocalFileSystem * locale - locale determines, which language, ElFinder will use, to translate user interface, default is current request locale * editor - determines what template to render, to be compatible with WYSIWYG web editor, currently supported options are: - "ckeditor", "tinymce" and "simple". How to configure CKEDitor and TinyMCE to work with this bundle, will be explained further in this document. + "ckeditor", "tinymce", "simple" and "custom". How to configure CKEDitor and TinyMCE to work with this bundle, will be explained further in this document. "simple" can be used as standalone filebrowser for managing and uploading files. +* editor_template - define template to renderer editor is set to "custom". * showhidden - hides directories starting with . (dot) * connector - root node for defining options for elfinder root directiories and debug option * roots - define