Skip to content
Snippets Groups Projects
Commit a049d3ae authored by Marco Huber's avatar Marco Huber
Browse files

[BUGFIX] Load TinyMCE via require.js to fix problems with IRRE and update some more core changes

parent 6fb938c8
No related branches found
No related tags found
No related merge requests found
......@@ -280,6 +280,29 @@ class Loader {
$pageRenderer->addJsFile($script, 'text/javascript', FALSE, TRUE, '', TRUE);
}
/**
* Loads the required javascript via the require.js
*
* @return void
* @see \SGalinski\Tinymce4Rte\Form\Element\RichTextElement->loadRequireModulesForRTE
*/
public function loadJsViaRequireJS() {
if (self::$init) {
return;
}
self::$init = TRUE;
$scripts = array();
$pathToTinyMceExtension = ExtensionManagementUtility::extRelPath('tinymce');
$scripts[] = $GLOBALS['BACK_PATH'] . $pathToTinyMceExtension . 'Contrib/tinymce/tinymce.min.js';
$scripts[] = $GLOBALS['BACK_PATH'] . $pathToTinyMceExtension . 'Contrib/MutationObserver/MutationObserver.js';
$scripts[] = $GLOBALS['BACK_PATH'] . $pathToTinyMceExtension . 'Contrib/WeakMap/WeakMap.js';
$scripts[] = $GLOBALS['BACK_PATH'] . $pathToTinyMceExtension . 'Resources/Public/JavaScript/Loader.js';
$scripts[] = $this->getConfiguration();
return $scripts;
}
/**
* Parses and processes the tinyMCE configuration
*
......
......@@ -182,6 +182,7 @@ SG.TinyMceLoader.prototype = {
if (hasMatches) {
this.tinyMceOptions.selector = this.tinyMceOptions.selector.slice(1);
this.originalInit.call(tinymce, this.getTinyMceOptionsAsNewObject());
document.getElementById('pleasewait' + this.tinyMceOptions.editornumber).style.display = 'none';
}
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment