Issue Task Closed

#103242Import IndentBlock from ckeditor5-indent

Sven Wappler 03/01/24, 21:30 updated 12/02/25, 14:33

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'] },

Reviews 2

History 913

  1. Timo Webler commented <span data-processor="relativetime" data-value="2024-03-04T07:27:28+00:00" > 03/04/24, 07:27 </span>

    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

  2. wini2 no-lastname-given commented <span data-processor="relativetime" data-value="2024-03-28T15:35:46+00:00" > 03/28/24, 15:35 </span>

    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 ]
  3. Georg Ringer commented and changed status New Accepted <span data-processor="relativetime" data-value="2024-06-20T20:12:08+00:00" > 06/20/24, 20:12 </span>

    yes IndentBlock is missing

  4. Gerrit Code Review pushed patch set 1 for main to change 88620 status Accepted Under Review <span data-processor="relativetime" data-value="2025-03-17T20:45:34+00:00" > 03/17/25, 20:45 </span>

  5. Georg Ringer commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-03-25T20:35:08+00:00" > 03/25/25, 20:35 </span>

    Applied in changeset commit:e7a779e66b495455194fa71a1282ceee6361718d.