-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to have the custom RTEs processed for icons ? #1
Comments
Right now I've achieved to solve my problem with a custom viewhelper
|
Yes, the output must be processed by the DataProcessor at the end. Otherwise, the content would be displayed exactly as it is stored in the database: <icon data-iconfig="fa6:solida,circle-info"></icon> In principle, there are many ways to solve this, and a custom ViewHelper is also possible. Here is an example for you:
--
-- Table structure for table 'tt_content'
--
CREATE TABLE tt_content (
icontest mediumtext,
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
'tt_content',
[
'customfield' => [
'label' => 'My custom field',
'config' => [
'type' => 'text',
'cols' => 80,
'rows' => 15,
'enableRichtext' => true,
'richtextConfiguration' => 'default',
],
]
]
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'tt_content',
'customfield'
);
<f:format.html>{data.customfield}</f:format.html>
Note that fieldType has the value "rte"! I don't know exactly what your extension is like, but the way shown here works and has been tested by me. PS: Don't forget to include the TypoScript delivered with the extension, or to take over the parts that are relevant for you!
|
This is not what I need, as I do not have a proper field in the database. |
Any News on this topic ? What I would need is a viewhelper that would be able to process the RTE content after it has been parsed by <f:format.html> |
Sorry for the inconvenience... Didn't remember I'v build my own viewhelper. Here it is
|
Note: https://github.com/quellenform/t3x-iconpack/blob/main/Classes/Html/IconpackHtmlParser.php |
I've encountered a problem and don't know at the moment how to solve it.
If I input an icon in the bodytext of a tt_content the icon is properly displayed.
If I setup a rte in another type of content (in my case build with flux) the rte isn't processed in the same way.
I guess the problem is coming from the fact that the icons are processed in a dataprocessing of lib.contentElement instead of the lib.parseFunc_RTE
See the capture below first icon is set in a tt_content bodytext the other on in a custom content element.
any help would be welcome.
The text was updated successfully, but these errors were encountered: