ckeditor: custom config not loaded in flexform / problem determining pid
When a new preset is configured with "RTE.default.preset = myCustomPreset", any "default" RTE should receive the myCustomPreset instead.
The merging / overlaying in \TYPO3\CMS\Core\Configuration\Richtext::getConfiguration relies on the pid to determine the custom config to load.
But somehow, in a flexform context, the pid is 0, thus the default config will be loaded.
I managed to work around this problem in my case by putting the config in the ext_localconf.php and registering it via \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig, but this only works, if you don't need to switch the default e.g. on multitree / multidomain setups.