sabbelasichon / typo3_encore

Use Webpack Encore within TYPO3
Other
108 stars 19 forks source link

Not working with RTE in a flexform #195

Closed andreknieriem closed 1 month ago

andreknieriem commented 1 year ago

Hi there,

first of all: Thanks for this great extension! I've been using it now for a long time without any problems. Now I added a flexform to one content element with an rte. Your extension does not find them and doesn't replace the placeholder with the correct path to the css file.

I think a addition to Ssch\Typo3Encore\Form\FormDataProvider\RichtextEncoreConfiguration could help here, but Flexforms are sometimes very nested so I don't know where to start here.

To reproduce this you can use this flexform for example:

<T3DataStructure>
    <sheets>
        <sDEF>
            <ROOT>
                <TCEforms>
                    <sheetTitle>Einstellungen</sheetTitle>
                </TCEforms>
                <type>array</type>
                <el>
                    <settings.test>
                        <TCEforms>
                            <label>Text</label>
                            <config>
                                <type>text</type>
                                <enableRichtext>1</enableRichtext>
                                <richtextConfiguration>myext_default</richtextConfiguration>
                            </config>
                        </TCEforms>
                    </settings.test>
                </el>
                    </settings.headlines>
                </el>
            </ROOT>
        </sDEF>
    </sheets>
</T3DataStructure>
sabbelasichon commented 1 month ago

@andreknieriem Thanks for your feedback. Good things come to those who wait. I found some time today to dig into your problem and i guess i have found the reason for it.

sabbelasichon commented 1 month ago

@andreknieriem Could you please add the following to your configuration to try it out:

$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['formDataGroup']['flexFormSegment'][\Ssch\Typo3Encore\Form\FormDataProvider\RichtextEncoreConfiguration::class] = [
    'depends' => [\TYPO3\CMS\Backend\Form\FormDataProvider\TcaText::class],
];