Skip to content
Permalink
Browse files

hack to check if TinyMCE scripts are loaded

  • Loading branch information...
Pathologic
Pathologic committed Dec 3, 2017
1 parent c30c2da commit fffa9a6185ff4a7fdb85bac424faecfef49e2518
Showing with 10 additions and 2 deletions.
  1. +5 −1 README.md
  2. +5 −1 assets/plugins/simplegallery/plugin.simplegallery.php
@@ -1,4 +1,8 @@
SimpleGallery
=============

MODX Evo plugin to manage images
MODX Evo plugin to manage images.

## Install
1. Install DocLister package from Extras.
2. Install SimpleGallery package from Extras.
@@ -3,7 +3,11 @@
$e = &$modx->event;
if ($e->name == 'OnDocFormRender') {
include_once(MODX_BASE_PATH . 'assets/plugins/simplegallery/lib/plugin.class.php');
global $modx_lang_attribute;
global $modx_lang_attribute, $richtexteditorIds;
//Hack to check if TinyMCE scripts are loaded
if (isset($richtexteditorIds['TinyMCE4'])) {
$modx->loadedjscripts['TinyMCE4'] = array('version' => '4.3.6');
}
$plugin = new \SimpleGallery\sgPlugin($modx, $modx_lang_attribute);
if ($id) {
$output = $plugin->render();

0 comments on commit fffa9a6

Please sign in to comment.
You can’t perform that action at this time.