TYPO3: CKEditor: Removes attribute in frontend; backend OK
Asked Answered
K

1

1

TYPO3 10.4.20

I have styled an ordered list and I want to use a start-number.

In my YAML I have added:

editor:
  config:
    extraAllowedContent:
      - ol[*]

# Allow s and u tag
processing:
  allowAttributes: [ data-count, start ]
  HTMLparser_db:
    tags:
      ol:
        allowedAttribs: "start"

In the editor everything is fine:

<ol start="5">
    <li><strong>Text</strong><br />
    More Text</li>
    <li><strong>Text</strong><br />
    More Text</li>
</ol>

The attribute start="5" is saved.

But in the frontend the start="5" is gone.

What do I need?

Kief answered 17/9, 2021 at 6:10 Comment(3)
The funny thing is, data-count works, start not.Kief
Seems to be a CKEditor problem: github.com/ckeditor/ckeditor5/issues/1032Kief
This is exactly what I need: #23699628Kief
B
-1

Try this, add some additional configuration in your preset config. Check it out below:

# Load default processing options
imports:
    - { resource: "EXT:web_conf/Configuration/YAML/Processing.yaml" }

# Add configuration for the editor
# For complete documentation see http://docs.ckeditor.com/#!/api/CKEDITOR.config
editor:
  config:
    allowedContent: true
    extraAllowedContent: "*(*);*{*}"
    fillEmptyBlocks: false
    tabSpaces: 0
    forcePasteAsPlainText: true
    entities_additional: ''
    removePlugins: null

Your processing configuration seems correct. So,let it be.

# Allow s and u tag
processing:
  allowAttributes: [ data-count, start ]
  HTMLparser_db:
    tags:
      ol:
        allowedAttribs: "start"

This works for me.

Boots answered 17/9, 2021 at 6:45 Comment(1)
No difference. Backend OK, Frontend start="5" is gone.Kief

© 2022 - 2024 — McMap. All rights reserved.