Skip to content

CKEditor auto wrapping HTML elements in p tags #392

Open

Description

@austin-borck

Description

When adding a tags ckeditor is auto wrapping with p tags, the config 'autoParagraph: false' does not seem to work

Steps to reproduce

  1. Add a link in the ckeditor
  2. Edit source and see the wrapping p tag

Additional info

  • Craft version: 5.6.11 PRO
  • PHP version: 8.2.27
  • Database driver & version: MariaDB 10.6.21
  • Plugins & versions: "craftcms/ckeditor": "4.6.0"

Activity

  1. i-just commented on Apr 17, 2025

    @i-just
    Contributor

    Hi, thanks for getting in touch!

    The autoParagraph setting hasn’t been included in CKEditor 5. Here’s a reasoning behind it from the CKEditor team.

    Are you trying to achieve a single-line scenario? If so, you might want to look at this thread: #341.

  2. austin-borck commented on Apr 17, 2025

    @austin-borck
    Author

    Hi, thanks for getting in touch!

    The autoParagraph setting hasn’t been included in CKEditor 5. Here’s a reasoning behind it from the CKEditor team.

    Are you trying to achieve a single-line scenario? If so, you might want to look at this thread: #341.

    Hey thanks for getting back to me.

    The issue I am running into is that the CKEditor keeps wrapping everything in <p> tags on save causing problems with things like bootstrap dropdowns and other components that rely on specific markup structure. The team using the CKEditor is pretty comfortable with writing clean HTML so we are just looking for a way to make CKEditor stop this forced structure.

    Thanks much!

  3. austin-borck commented on Apr 24, 2025

    @austin-borck
    Author

    It looks like this is already being tracked on CKeditor things, I have seen a small handful of similar issues do you know if there is any work around for now, I have not been able to find any for CKEditor 5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions