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

[BUGFIX] Non-relative paths to the contentCSS are not accepted

Fixes: #61163
parent 70063c9b
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,7 @@ 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;
/**
* A RTE using TinyMCE
......@@ -90,10 +91,14 @@ class RteBase extends AbstractRte {
$tinyMCE = GeneralUtility::makeInstance('tinyMCE');
$tinyMCE->loadConfiguration($userOrPageProperties['properties']['default.']['tinymceConfiguration']);
if ($userOrPageProperties['properties']['default.']['contentCSS'] !== '') {
$tinyMCE->addConfigurationOption(
'content_css',
'/' . $userOrPageProperties['properties']['default.']['contentCSS']
);
$contentCssFile = GeneralUtility::getIndpEnv('TYPO3_SITE_URL') .
PathUtility::stripPathSitePrefix(
GeneralUtility::getFileAbsFileName(
$userOrPageProperties['properties']['default.']['contentCSS']
)
);
$tinyMCE->addConfigurationOption('content_css', $contentCssFile);
}
$tinyMCE->loadJsViaPageRenderer($pageRenderer, TRUE);
......
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