Issue Bug Closed

#102633ckeditor 5 removes <p> inside <li>

Dmitry Dulepov 12/08/23, 15:00 updated 01/26/25, 21:55

Description

Source in the database and in the html of the page:

<ul>     <li>     <p><a class="default" href="t3://page?uid=248#10706">Ingress</a></p>     </li>

In the source view of ckeditor:

<ul>
    <li>
        <a class="default" href="t3://page?uid=248#10706">Ingress</a>
    </li>
</ul>

Config:

# Load default processing options
imports:
    - { resource: "EXT:rte_ckeditor/Configuration/RTE/Processing.yaml" }
    - { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Base.yaml" }
    - { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Plugins.yaml" }

# Add configuration for the editor
# For complete documentation see http://docs.ckeditor.com/#!/api/CKEDITOR.config
editor:
  config:
    bodyClass: "csc-element ctype-textpic %ce-class%"

    contentsCss:
      - "EXT:rte_ckeditor/Resources/Public/Css/contents.css"
      - "%app.css%"

    stylesSet: []

    format_tags: "p;h1;h2;h3;h4;pre"

    toolbarGroups:
      - { name: styles, groups: [ format ] }
      - { name: basicstyles, groups: [ basicstyles ] }
      - { name: paragraph, groups: [ list, indent, blocks, align ] }
      - { name: links, groups: [ links ] }
      - { name: clipboard, groups: [ cleanup, undo ] }
      - { name: special, groups: [ insert, tools, mode ] }

    justifyClasses: []

    extraPlugins:
      - liststyle

    removePlugins:
      - image
      - blockquote
      - horizontalrule

    removeButtons:
      - Anchor
      - Strike
      - Styles
      - PasteFromWord
      - PasteText

In TYPO3 11 it was not the issue:

<ul>
    <li>
    <p><a class="default" href="t3://page?uid=248#10706">Ingress</a></p>
    </li>
</ul>

Unfortunately it breaks how pages look like after a simple text change.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.