TYPO3-Documentation / TYPO3-Documentation/TYPO3CMS-Reference-Typoscript

RTE.editor in page TSconfig is undocumented — need Core input on the exact behaviour

Open
#1,823 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

content missing help wanted
Dominant language
Shell
Stars
13
Forks
195
Avg merge
11h 32m
Merged PRs (30d)
130

Description

Splitting this out of #1565, whose second half asks for RTE.editor examples in the Page TSconfig chapter. Writing them turned out to need answers only a Core developer can give, so this is a request for help rather than a ready-to-write task.

The gap

The rte_ckeditor Configuration Reference sends readers here:

Page TSconfig — We recommend you to put all configurations for the preset in the YAML configuration. However, it is still possible to override these settings through the page TSconfig. You can find a list of configuration properties in the Page TSconfig reference, chapter RTE.

Our RTE chapter documents disabled, buttons and proc — but not editor, which is where CKEditor itself is configured, nor preset. So the trail ends without an answer, which is exactly the complaint in #1565.

What the source says (checked on main, 14.3 and 13.4)
  • Richtext::getConfiguration() loads the preset, then merges the page TSconfig RTE.* tree over it with ArrayUtility::mergeRecursiveWithOverrule(); addFlattenedPageTsConfig() supplies the un-dotted copy, so RTE.default.editor.config.<option> lands on the preset's editor.config.<option>.
  • RichTextElement takes richtextConfiguration['editor'] and hands ['config'] to CKEditor via jsonEncodeForHtmlAttribute().
  • CKEditor5Migrator then post-processes (on main/14.3 via AfterRichtextConfigurationPreparedEvent, on 13.4 still called inline).
Where source and documentation disagree

rte_ckeditor/Documentation/Configuration/Concepts.rst states:

be aware that boolean values can not be set, and arrays are not merged but overridden.

ArrayUtility::mergeRecursiveWithOverrule() recurses whenever both sides are arrays, i.e. arrays are merged key by key. The two readings give opposite results for the most obvious real-world case — adding a stylesheet:

RTE.default.editor.config.contentsCss.10 = EXT:site_package/Resources/Public/Css/rte.css

Merged → the preset's contents.css and rte.css are loaded. Overridden → only rte.css. We do not want to document the wrong one.

Questions for a Core developer
  1. Is overriding editor.config.* from page TSconfig supported, or discouraged in favour of presets? A GitHub code search finds no site package using it — only copies of Concepts.rst.
  2. Arrays: merged key by key, or replaced? Which of the two statements above is correct, and should Concepts.rst be corrected?
  3. Booleans: confirmed unusable, since page TSconfig yields strings and "0" is truthy in JavaScript? Is there a recommended way to switch an option off?
  4. Is __UNSET (supported by mergeRecursiveWithOverrule) intended to be usable here to drop a key from the preset?
  5. Should this be documented in the TypoScript reference at all, or should the rte_ckeditor manual own it, with only a link from here?

Happy to write the section as soon as 1–4 are settled; a branch with a first draft exists already.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with rte_ckeditor/Documentation/Configuration/Concepts.rst and the Page TSconfig RTE reference, then inspect the named Richtext::getConfiguration(), RichTextElement, and CKEditor5Migrator paths. Confirm the four behavior questions with a Core developer before writing; done means the ownership, merge behavior, boolean handling, and __UNSET support are settled and documented consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
yaml
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.