Feature #103242
openImport IndentBlock from ckeditor5-indent
0%
Description
To be able to use custom classes for blocks like
indentBlock:
classes:
- 'ps-2'
- 'ps-3'
- 'ps-4'
I think in file Build/Sources/TypeScript/rte_ckeditor/ckeditor5.ts instead of
{ module: '@ckeditor/ckeditor5-indent', exports: ['Indent'] },
it should be
{ module: '@ckeditor/ckeditor5-indent', exports: ['Indent','IndentBlock'] },
Updated by Timo Webler 9 months ago
I can confirm, that these change will active the plugin.
I tried to activate the plugin via configuration, but that doesn't work.
importModules: - { 'module': '@ckeditor/ckeditor5-indent', 'exports': ["IndentBlock"] }
Maybe the import of user modules before the default modules can fix the problem. https://github.com/TYPO3/typo3/blob/3cf86c37dac28c4a440fc2b15b12c1ea132e0934/Build/Sources/TypeScript/rte_ckeditor/ckeditor5.ts#L190C11-L190C30
Updated by wini2 no-lastname-given 8 months ago ยท Edited
Maybe I'm wrong but the indentblock is not shipped with TYPO3 - at least I can't find the typescript-pendant https://github.com/ckeditor/ckeditor5/blob/eab01dfbcf/packages/ckeditor5-indent/src/indentblock.ts#L28 in https://github.com/TYPO3/typo3/tree/main/typo3/sysext/rte_ckeditor/Resources/Public/Contrib/%40ckeditor.
Addendum:
editor: config: importModules: ... - { 'module': '@ckeditor/ckeditor5-indent', 'exports': [ 'IndentBlock' ] }
indeed does the trick; sets 40px for each indentation level to the tag (style="40px"). The value seem to come from ckeditor5-indent.js.
For the usage of classes
indentBlock: classes: - 'ps-2' - 'ps-3' - 'ps-4'
works for me.
If the style-attr. is used, DB-Storage/FE-Output it needs to be added in processing.yaml
allowAttributes: [class, id, title, dir, lang, xml:lang, itemscope, itemtype, itemprop, style ]
Updated by Georg Ringer 5 months ago
- Related to Story #101906: CKEditor5 missing plugins added