diff --git a/Classes/Hooks/T3libTcemainHook.php b/Classes/Hooks/T3libTcemainHook.php index edc5b6f..4a0a784 100644 --- a/Classes/Hooks/T3libTcemainHook.php +++ b/Classes/Hooks/T3libTcemainHook.php @@ -20,8 +20,6 @@ function clearCachePostProc($params, &$pObj) { return; } switch($params['cacheCmd']) { - case 'pages': - case 'all': case 'dyncss': GeneralUtility::rmdir( PATH_site . 'typo3temp/Cache/Data/DynCss', diff --git a/Classes/XClass/RteHtmlAreaBase.php b/Classes/XClass/RteHtmlAreaBase.php new file mode 100644 index 0000000..9f32cc4 --- /dev/null +++ b/Classes/XClass/RteHtmlAreaBase.php @@ -0,0 +1,19 @@ +thisConfig['contentCSS'] = parent::getContentCssFileName(); + + $this->thisConfig['contentCSS'] = substr(\KayStrobach\Dyncss\Service\DyncssService::getCompiledFile($this->thisConfig['contentCSS']), 3); + + return parent::getContentCssFileName(); + } +} \ No newline at end of file diff --git a/ext_conf_template.txt b/ext_conf_template.txt index c1f41bf..192f723 100644 --- a/ext_conf_template.txt +++ b/ext_conf_template.txt @@ -2,4 +2,7 @@ state = # cat=basic; type=boolean; label= Enable Debugmode (e.g. for firesass or similar), if the used parser is able to do that -enableDebugMode = \ No newline at end of file +enableDebugMode = + +# cat=basic; type=boolean; label= Enable xclass for parsing RTE.default.contentCSS +enableRteXclass = 1 \ No newline at end of file diff --git a/ext_localconf.php b/ext_localconf.php index 057f247..edaa64c 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -40,3 +40,11 @@ // clear cache item $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'][] = 'KayStrobach\Dyncss\Hooks\T3libTcemainHook->clearCachePostProc'; $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions'][] = 'KayStrobach\Dyncss\Hooks\Backend\Toolbar\ClearCacheActionsHook'; + +// pagets rte xclass parsing RTE.default.contentCSS + $dynCssConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['dyncss']); + if($dynCssConfig['enableRteXclass']) { + $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3\CMS\Rtehtmlarea\RteHtmlAreaBase'] = array( + 'className' => 'KayStrobach\Dyncss\XClass\RteHtmlAreaBase', + ); + }