Breaking: #67811 - Rte API¶
See Issue #67811
Description¶
The RTE implementation was based on the main classes \TYPO3\CMS\Backend\Rte\AbstractRte,
\TYPO3\CMS\Rtehtmlarea\RteHtmlAreaBase and \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi. These
three main API were removed or changed method signatures and internal method calls.
The functionality to render RTE standalone and out of a context of FormEngine was dropped.
Impact¶
Main API changes¶
- Method
TYPO3\CMS\Backend\Utility\BackendUtility::RTEgetObj()is deprecated and no longer used.FormEnginenow creates aRichTextElementwithNodeFactoryandmakeInstance(), the created object is not a singleton but a prototype. - With the deprecation of
RTEgetObjmethodtransformContentfromAbstractRtehas been inlined toDataHandler. - Method
isAvailablefromAbstractRtehas been dropped. Every valid browser and browser version for TYPO3 CMS 7 can render the default richtext editor. Custom checks may be implement viaNodeResolverInterfaceinFormEngine. - Property
RTE_errorsinTYPO3\CMS\Core\Authentication\BackendUserAuthenticationhas been dropped along with theRTEgetObj()deprecation.
RTE registration¶
- Different richtext implementations can no longer register in
$GLOBALS['TYPO3_CONF_VARS']['BE']['RTE_reg']. Instead, registration must be done inFormEngineviaNodeFactoryAPI, the methoddrawRTEhas been dropped. - Transformations are not available via
AbstractRteanymore, hooks withinRteHtmlParsercan be used for custom transformations.
PHP classes¶
\TYPO3\CMS\Backend\Rte\AbstractRtehas been dropped.\TYPO3\CMS\Rtehtmlarea\RteHtmlAreaBasehas been dropped and its functionality was moved to\TYPO3\CMS\Rtehtmlarea\Form\Element\RichtextElement. All methods and properties except the main entry methodrender()used byFormEngineare protected.\TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApihas been refactored. Methodmain()receives a configuration array instead of an instance of the parent object. Some methods were dropped and are no longer called.
RTE Plugin Configuration¶
- Parameter
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['anExtensionKey']['plugins']['aPluginName']['addIconsToSkin']was dropped, plugin propertyrelativePathToSkinis no longer evaluated. - A couple of helper methods were added to
RteHtmlAreaApi - This API may get further changes in the future.
Affected Installations¶
Extensions that extend one of the above mentioned extensions or API.
Migration¶
Adapt the code using these methods.