Skip to content

Commit

Permalink
Merge pull request silverstripe#132 from open-sausages/pulls/4.0/that…
Browse files Browse the repository at this point in the history
…s-a-wrap

Set user themes on TinyMCEConfig before overwriting with admin themes
  • Loading branch information
Damian Mooyman authored Jul 2, 2017
2 parents e4b7697 + a484718 commit bc537c3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/LeftAndMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,13 @@ protected function init()
$dummy = null;
$this->extend('init', $dummy);

// Load the editor with original user themes before overwriting
// them with admin themes
$themes = HTMLEditorConfig::config()->get('user_themes');
if (empty($themes)) {
HTMLEditorConfig::config()->set('user_themes', SSViewer::get_themes());
}

// Assign default cms theme and replace user-specified themes
SSViewer::set_themes(LeftAndMain::config()->uninherited('admin_themes'));

Expand Down

0 comments on commit bc537c3

Please sign in to comment.