92812[FEATURE] Support RTE in form editor
Commit message
Review
-
Code review CR +2 Done
- Georg Ringer +2
- Garvin Hicking +1
- Sven Liebert +1
-
Verified V +2 Done
- Georg Ringer +2
- Garvin Hicking +1
- Sven Liebert +1
- core-ci +1 CI
Issues 4
Files 39
- Build/Sources/TypeScript/form/backend/form-editor/component/form-element-stage-item.ts+3 −2
- Build/Sources/TypeScript/form/backend/form-editor/utility/string-utility.tsnew+33 −0
- Build/Sources/TypeScript/form/backend/form-editor/core.ts+2 −0
- Build/Sources/TypeScript/form/backend/form-editor/inspector-component.ts+47 −3
- Build/Sources/TypeScript/form/backend/form-editor/tree-component-adapter.ts+3 −1
- typo3/sysext/core/Documentation/Changelog/14.2/Feature-108966-RichTextEditorSupportInFormEditor.rstnew+156 −0
- typo3/sysext/form/Classes/Controller/FormEditorController.php+14 −2
- typo3/sysext/form/Classes/Domain/Configuration/FormDefinitionConversionService.php+365 −4
- typo3/sysext/form/Classes/Domain/Factory/AbstractFormFactory.php+12 −1
- typo3/sysext/form/Classes/Domain/Factory/ArrayFormFactory.php4+9 −3
- typo3/sysext/form/Classes/Mvc/Property/TypeConverter/FormDefinitionArrayConverter.php+42 −15
- typo3/sysext/form/Classes/Service/FormEditorEnrichmentService.phpnew+138 −0
- typo3/sysext/form/Classes/Service/RichTextConfigurationService.phpnew+327 −0
- typo3/sysext/form/Configuration/RTE/FormContent.yamlnew+23 −0
- typo3/sysext/form/Configuration/RTE/FormLabel.yamlnew+20 −0
- typo3/sysext/form/Configuration/RTE/ProcessingContent.yamlnew+40 −0
- typo3/sysext/form/Configuration/RTE/ProcessingLabel.yamlnew+36 −0
- typo3/sysext/form/Configuration/Yaml/FormElements/Checkbox.yaml+3 −1
- typo3/sysext/form/Configuration/Yaml/FormElements/Form.yaml+1 −0
- typo3/sysext/form/Configuration/Yaml/FormElements/StaticText.yaml+2 −0
Show 19 more files
- typo3/sysext/form/Documentation/I/Config/proto/formElements/formEditor/inspectorEditors/TextareaEditor.rst+99 −0
- typo3/sysext/form/Resources/Private/Frontend/Partials/Checkbox.fluid.html5+3 −3
- typo3/sysext/form/Resources/Private/Frontend/Partials/StaticText.fluid.html+1 −1
- typo3/sysext/form/Resources/Private/Frontend/Partials/SummaryPage.fluid.html+1 −1
- typo3/sysext/form/Resources/Private/Frontend/Templates/Finishers/Confirmation/Confirmation.fluid.html+1 −8
- typo3/sysext/form/Resources/Private/Frontend/Templates/Finishers/Email/Default.fluid.html+1 −1
- typo3/sysext/form/Resources/Private/Frontend/Templates/Finishers/Email/Default.fluid.txt+2 −2
- typo3/sysext/form/Resources/Private/Language/Database.xlf2+1 −1
- typo3/sysext/form/Resources/Public/JavaScript/backend/form-editor/component/form-element-stage-item.js+1 −1
- typo3/sysext/form/Resources/Public/JavaScript/backend/form-editor/utility/string-utility.jsnew+13 −0
- typo3/sysext/form/Resources/Public/JavaScript/backend/form-editor/inspector-component.js+1 −1
- typo3/sysext/form/Resources/Public/JavaScript/backend/form-editor/tree-component-adapter.js+1 −1
- typo3/sysext/form/Tests/Functional/Controller/FormEditorControllerTest.php+147 −1
- typo3/sysext/form/Tests/Functional/Domain/Factory/ArrayFormFactoryTest.php+7 −6
- typo3/sysext/form/Tests/Functional/Mvc/Property/TypeConverter/FormDefinitionArrayConverterTest.php+42 −18
- typo3/sysext/form/Tests/Unit/Domain/Configuration/FormDefinitionConversionServiceTest.php+196 −12
- typo3/sysext/form/Tests/Unit/Service/FormEditorEnrichmentServiceTest.phpnew+240 −0
- typo3/sysext/form/Tests/Unit/Service/RichTextConfigurationServiceTest.phpnew+326 −0
- typo3/sysext/form/ext_localconf.php+10 −0
Review log 4058
Show 2233 earlier messages
-
Josua Vogel uploaded patch set 1 02/12/26, 09:57
-
core-ci voted on patch set 1 V -1 02/12/26, 10:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95700
-
Josua Vogel uploaded patch set 2
V -102/12/26, 17:21 -
core-ci voted on patch set 2 V +1 02/12/26, 17:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95760
-
Josua Vogel commented on patch set 3
V +102/12/26, 18:21Published edit on patch set 2. -
core-ci voted on patch set 3 V -1 02/12/26, 18:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95763
-
Josua Vogel uploaded patch set 4
V -102/12/26, 19:12 -
core-ci voted on patch set 4 V +1 02/12/26, 19:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95766
-
Georg Ringer commented on patch set 4 02/12/26, 21:08
this is sooo cool! just a nitpicking. the label "a field for unformatted text" is now not true anymore and what if rte_ckeditor is not installed? -
Garvin Hicking commented on patch set 4 02/12/26, 21:12
We'll need to keep this in line with https://review.typo3.org/c/Packages/TYPO3.CMS/+/90612 @andy@pixelde.su (you both probably now, just for the sake of completion) -
Josua Vogel commented on patch set 4 02/13/26, 06:40
Reply
Thanks Garvin, a quick glance: Andreas' implementation should eliminate some code here :) If this is to be merged, I would subsequently build the form part at Andreas' patch or create a follow-up. -
Josua Vogel uploaded patch set 5
V +102/13/26, 07:12 -
Josua Vogel commented on patch set 5 02/13/26, 07:14
Reply
Updated the label and added a check to determine whether rte_ckeditor is installed. If not, it falls back to a plain textarea. -
Georg Ringer commented on patch set 5 02/13/26, 07:15
Database.xlf:1162read-only? not sure if this is valid, either "rich text content" or just "text content" -
Josua Vogel commented on patch set 6 02/13/26, 07:16
Published edit on patch set 5. -
Josua Vogel commented on patch set 6 02/13/26, 07:17
Database.xlf:1162ReplyDone -
core-ci voted on patch set 5 V +1 02/13/26, 07:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95802
-
core-ci voted on patch set 6 V +1 02/13/26, 07:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95803
-
Guido Schmechel commented on patch set 6 V +1 02/14/26, 10:25
The static text has been successfully tested html in the backend. But shouldn't we add more to the tests? For example, two new classes are being added here. -
Josua Vogel commented on patch set 6 02/14/26, 10:38
Reply
Absolutely! I will add some tests soon -
Josua Vogel uploaded patch set 7
V +102/15/26, 14:37 -
Josua Vogel marked it work in progress 02/15/26, 14:45
-
core-ci voted on patch set 7 V -1 02/15/26, 14:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95930
-
Josua Vogel uploaded patch set 8
V -102/15/26, 15:01 -
Josua Vogel uploaded patch set 9 02/15/26, 15:04
-
core-ci voted on patch set 9 V -1 02/15/26, 15:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95932
-
Josua Vogel uploaded patch set 10
V -102/15/26, 15:29 -
Josua Vogel marked it ready for review 02/15/26, 15:30
-
Josua Vogel commented on patch set 10 02/15/26, 15:32
Reply
I have added some tests. -
core-ci voted on patch set 8 V -1 02/15/26, 15:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95931
-
core-ci voted on patch set 10 V +1 02/15/26, 15:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95933
-
Josua Vogel uploaded patch set 11
V +102/15/26, 16:19 -
core-ci voted on patch set 11 V +1 02/15/26, 16:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95934
-
Josua Vogel uploaded patch set 12
V +102/16/26, 11:50 -
core-ci voted on patch set 12 V +1 02/16/26, 12:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95962
-
Andreas Nedbal commented on patch set 12 CR +1 V +1 02/16/26, 14:08
Looks good to me. Can't 100% verify the actual usage as I have barely any experience with EXT:form but what I've seen and tested looks fine! -
Garvin Hicking commented on patch set 12 02/17/26, 13:45
ArrayFormFactory.php:59How to define a custom builder?Checkbox.fluid.html:23So I have a bit of a concern here regarding the processing: 1.) If I read this right, editors will by default now be able to enter any kind of HTML. The output is solely passed through the sanitize.html and transform.html functionality, so probably now HTML can occur at places that integrators / theme builders might not have accounted for. I wonder if this should thus be gated at some place that an integrator has a say over, and a place to at least opt out easily (without the need to edit every single form) 2.) I believe (untested) you can tamper with the CKEditor inside the browser. You can convert the input textarea to a plain textarea and then insert any kind of HTML, which will later be shown (unless it is javascript), because the Default Sanitizer Builder allows a lot of tags. Usually the frontend based rendering for CKEditor via RTE.processing and the HtmlParser stuff for input/output processing takes care of this in content elements, but that's not given here. So I wonder if we can inject HTML tags outside of the scope that CKEditor would allow, and break frontend rendering. Thoughts? -
Josua Vogel commented on patch set 12 02/17/26, 16:52
ArrayFormFactory.php:59ReplyThis is not possible in the current implementation. I am considering how this can be configured.Checkbox.fluid.html:23Reply1) In principle, this only affects the checkbox form element and static text. An integrator could simply use their own template and adjust the checkbox definition so that enableRichtext: false is set. It is not necessary to edit every form. 2) I have to try this 😊 Maybe a Custom Sanitizer would prevent "unwanted" tags? -
Garvin Hicking commented on patch set 12 02/17/26, 17:39
Checkbox.fluid.html:23ReplyAbout 2: we'd probably need to define a sanitizer builder then, and offering a very reduced one. Plus be able for integrators to easily use their own to remedy this problem woth missing RTE processing. That would however be a different approach to how "everyplace else" does it. Then again, ext:form is known for its extrawurst. Maybe the default form sanitizer could only allow strong/em/a href (matching the very restricted default RTE preset) for some sense of "editors cannot break this easily with block-level elements suddenly". -
Josua Vogel uploaded patch set 13
CR +1V +102/18/26, 15:32 -
core-ci voted on patch set 13 V +1 02/18/26, 16:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96162
-
Josua Vogel uploaded patch set 14
V +102/18/26, 16:59 -
Josua Vogel marked it work in progress 02/18/26, 16:59
-
core-ci voted on patch set 14 V +1 02/18/26, 17:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96178
-
Josua Vogel uploaded patch set 15
V +102/19/26, 10:42 -
core-ci voted on patch set 15 V -1 02/19/26, 10:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96232
-
Josua Vogel uploaded patch set 16
V -102/19/26, 12:02 -
Josua Vogel commented on patch set 16 02/19/26, 12:04
This change is ready for review.Checkbox.fluid.html:23ReplyI added an approach that reads the processing configuration and uses the RteHtmlParser between FormEditor and Persistence. -
core-ci voted on patch set 16 V +1 02/19/26, 12:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96240
-
Josua Vogel uploaded patch set 17
V +102/19/26, 13:18 -
Josua Vogel commented on patch set 17 02/19/26, 13:19
ArrayFormFactory.php:59ReplyNow you can set a custom sanitizer via the processing config of the preset. I added to the feature rst how to use a custom sanitizer build. -
core-ci voted on patch set 17 V +1 02/19/26, 13:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96243
-
Josua Vogel uploaded patch set 18
V +102/20/26, 17:29 -
core-ci voted on patch set 18 V +1 02/20/26, 17:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96391
-
Garvin Hicking commented on patch set 18 CR +1 V +1 02/20/26, 20:17
Massive kudos. I've tested this now in every facet I could imagine and I think your effort for the extra processing/builder mile is well worth it. I must admit it is a bit of a burden maintenance-wise, but then again it adheres to the rest of our sanitizer/processing workflow and encapsulates that in a good service class. The editorial impact of finally being able to add links and formatting to checkboxes is something that I've often heard was crucially missing. So I have to get off my soapbox now and want to emphasize all the effort you put into it. Thank you!ArrayFormFactory.php:59ReplyDoneCheckbox.fluid.html:23ReplyDone -
Sven Liebert voted on patch set 18 CR +1 V +1 02/20/26, 23:09
-
Georg Ringer voted on patch set 18 CR +2 V +2 02/21/26, 10:04
-
Georg Ringer merged patch set 19 02/21/26, 10:04