Skip to content
Snippets Groups Projects
Commit 226b65d2 authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

[TASK] Usage of the last EXT:tinymce release

parent ddc919f7
No related branches found
No related tags found
No related merge requests found
......@@ -26,11 +26,11 @@ namespace SGalinski\Tinymce4Rte\Editors;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use SGalinski\Tinymce\Loader;
use TYPO3\CMS\Backend\Form\FormEngine;
use TYPO3\CMS\Backend\Rte\AbstractRte;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Page\PageRenderer;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\PathUtility;
......@@ -86,9 +86,8 @@ class RteBase extends AbstractRte {
self::$coreLoaded = TRUE;
$userOrPageProperties = BackendUtility::getModTSconfig($thePidValue, 'RTE');
/** @var \tinyMCE $tinyMCE */
require_once(ExtensionManagementUtility::extPath('tinymce') . 'class.tinymce.php');
$tinyMCE = GeneralUtility::makeInstance('tinyMCE');
/** @var Loader $tinyMCE */
$tinyMCE = GeneralUtility::makeInstance('\SGalinski\Tinymce\Loader');
$tinyMCE->loadConfiguration($userOrPageProperties['properties']['default.']['tinymceConfiguration']);
if ($userOrPageProperties['properties']['default.']['contentCSS'] !== '') {
$contentCssFile = GeneralUtility::getIndpEnv('TYPO3_SITE_URL') .
......@@ -100,6 +99,15 @@ class RteBase extends AbstractRte {
$tinyMCE->addConfigurationOption('content_css', $contentCssFile);
}
$tinyMCE->addConfigurationOption(
'changeMethod', 'function() {
var TBE_EDITOR = window.TBE_EDITOR || null;
if (TBE_EDITOR && TBE_EDITOR.fieldChanged && typeof TBE_EDITOR.fieldChanged === \'function\') {
TBE_EDITOR.fieldChanged();
}
}'
);
$tinyMCE->loadJsViaPageRenderer($pageRenderer, TRUE);
$imageModule = BackendUtility::getModuleUrl('rtehtmlarea_wizard_select_image');
......@@ -133,17 +141,6 @@ class RteBase extends AbstractRte {
window.RTE["editor' . $editorId . '"].rteConfiguration = "' . $rteConfiguration . '";
window.RTE["editor' . $editorId . '"].typo3ContentLanguage = "' . $language . '";
window.RTE["editor' . $editorId . '"].sys_language_content = parseInt(' . $languageId . ');
// manually trigger the save to the plain textarea if a save button was clicked
$$(".c-inputButton").each(
function(element) {
element.observe(
"click", function() {
tinyMCE.triggerSave();
}
);
}
);
'
);
......
......@@ -16,9 +16,9 @@ $EM_CONF[$_EXTKEY] = array(
array(
'depends' =>
array(
'php' => '5.3.0-5.5.99',
'php' => '5.3.0-5.6.99',
'typo3' => '6.2.0-6.2.99',
'tinymce' => '4.1.5-4.1.99',
'tinymce' => '4.2.0-4.2.99',
),
'conflicts' =>
array(
......
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