From 38fdafb474e8204077849e83267ee3308b701afe Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Tue, 1 Nov 2016 17:40:59 +1300 Subject: [PATCH] Fix tinymce breaking in non-typical install location --- src/Forms/HTMLEditor/TinyMCEConfig.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Forms/HTMLEditor/TinyMCEConfig.php b/src/Forms/HTMLEditor/TinyMCEConfig.php index 7f7940d07..e041c8705 100644 --- a/src/Forms/HTMLEditor/TinyMCEConfig.php +++ b/src/Forms/HTMLEditor/TinyMCEConfig.php @@ -21,10 +21,12 @@ class TinyMCEConfig extends HTMLEditorConfig { * - themes * - skins * + * If left blank defaults to ADMIN_THIRDPARTY_DIR . '/tinymce' + * * @config * @var string */ - private static $base_dir = 'framework/admin/thirdparty/tinymce'; + private static $base_dir = null; /** * TinyMCE JS settings @@ -366,7 +368,7 @@ class TinyMCEConfig extends HTMLEditorConfig { // https://www.tinymce.com/docs/api/class/tinymce.editormanager/#baseURL $tinyMCEBaseURL = Controller::join_links( Director::absoluteBaseURL(), - $this->config()->base_dir + $this->config()->get('base_dir') ?: ADMIN_THIRDPARTY_DIR . '/tinymce' ); $settings['baseURL'] = $tinyMCEBaseURL;