Skip to content

Commit

Permalink
[F] modxcms#442 New inlite-theme is only compatible with inline-mode
Browse files Browse the repository at this point in the history
- backend falls back to modern-theme
Deesen committed Jan 27, 2018
1 parent f29ec86 commit c49d50d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion assets/plugins/tinymce4/bridge.tinymce4.inc.php
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ public function __construct($tvOptions=array())
'editorVersion' => '4.7.4', // Version of TinyMCE4-Library
'editorLogo' => 'tinymce/logo.png', // Optional Image displayed in Modx-settings

'bridgeParams'=>array('url_setup','style_formats','advanced_resizing','forced_root_block','contentsLangDirection','disabledButtons','selectorPrefix','selector','block_formats'),
'bridgeParams'=>array('url_setup','style_formats','advanced_resizing','forced_root_block','contentsLangDirection','disabledButtons','selectorPrefix','selector','block_formats','theme'),

// Custom settings to show below Modx- / user-configuration
'gSettingsCustom' => array(
@@ -337,4 +337,16 @@ public function bridge_block_formats($selector) {
// Right now its enough to return the string
return $this->modxParams['blockFormats'];
}

// https://github.com/evolution-cms/evolution/issues/442
public function bridge_theme($selector) {
global $modx;

// inlite-theme is only compatible with inline-mode / frontend
if($this->modxParams['skintheme'] == 'inlite' && $modx->event->name != 'OnWebPagePrerender') {
$this->set('theme', 'modern'); // Fallback to modern-theme in backend
}

return NULL;
}
}

0 comments on commit c49d50d

Please sign in to comment.