Bug #19490
RTE uses JScodeLibArray to insert CSS
Status: | Resolved | Start date: | 2008-10-21 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Stanislas Rolland | % Done: | 0% |
|
Category: | - | Spent time: | - | |
Target version: | - | |||
TYPO3 Version: | Is Regression: | |||
PHP Version: | Sprint Focus: | |||
Complexity: |
Description
In tx_rtehtmlarea_base, the RTE uses $GLOBALS['SOBE']->doc->JScodeLibArray to insert CSS into the page header. This was added in revision 4298.
When using edit forms on the page in frontend editing, we don't have a true doc template and are just going through TCEForms instead. This means that adding Javascript (or CSS) through JScodeLibArray has no effect.
In bug #19485, Olly added a separate loadJavascriptLib() method for frontend editing that inserts the Javascript libraries into TSFE but that won't be the correct solution for CSS files. I'd suggest falling back to $this->TCEform->additionalCode_pre as it was in the past or adding a generic loader into TCEForms.
I'm attaching a patch that uses $this->TCEform->additionalCode_pre and works correctly in my testing in both the frontend and backend (I am seeing problems with the RTE in IRRE child records but that seems to occur with and without my patch).
(issue imported from #M9613)
Related issues
History
#1 Updated by Oliver Hader almost 7 years ago
The "$GLOBALS['SOBE']->doc->JScodeLibArray['rtehtmlarea-contentCSS']" was introduced in issue #9516 and commited to SVN Trunk in rev. 4298 and TYPO3_4-2 in rev. 4297.
#2 Updated by Stanislas Rolland almost 7 years ago
This attached patch will use $GLOBALS['TSFE']->additionalHeaderData when available and adds additionalHeaderData array to class template.
#3 Updated by Stanislas Rolland almost 7 years ago
Committed to branch TYPO3_4-2 (revision 4347).
#4 Updated by Stanislas Rolland almost 7 years ago
Committed to SVN TYPO3core trunk (revision 4350).