Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider supporting a way to configure the editor for "Phrasing Content Only" #11697

Closed
LukeLeber opened this issue May 3, 2022 · 3 comments
Closed
Labels
resolution:duplicate This issue is a duplicate of another issue and was merged into it. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@LukeLeber
Copy link

LukeLeber commented May 3, 2022

Background

Historically speaking in CKEditor4 there were three enter modes:<p>, <br>, and <div>. These modes all seem to make the assumption that the root context for CKEditor was block level. For systems that use CKEditor to syndicate content to third parties, this assumption does not hold true -- especially if some of the third parties are difficult and/or impossible to work with.

Some root contexts can only support a limited subset of HTML. For the purpose of this feature request, I'll be focusing on Phrasing Content. Basically (this might be an oversimplification...) Phrasing Content is the stuff that makes up paragraphs. In other words, the element types that are able to be included in a <p> element type.

Suppose that a content consumer renders CKEditor markup on their platform as follows:

<p class="third-party-content">{{ CKEDITOR CONTENT HERE }}</p>

As it stands, CKEditor is not a valid tool for this use case because it would form markup in one of the following varieties:

<p class="third-party-content"><p>CKEditor Content</p></p>

or

<p class="third-party-content"><div>CKEditor Content</div></p>

For situations where the content consumer is unable or unwilling to make accommodations on their platform, this forms a hard blocker.

📝 Provide a description of the new feature

This new feature would allow editor configurations to remove the assumption that all content should be wrapped in a block level element. Due to the decoupled nature of CKEditor5, it seems like this might be more feasible than it was in the past?

What is the expected behavior of the proposed feature?
TBD

If you'd like to see this feature implemented, add a 👍 reaction to this post.

@LukeLeber LukeLeber added the type:feature This issue reports a feature request (an idea for a new functionality or a missing option). label May 3, 2022
@wimleers
Copy link

wimleers commented May 6, 2022

Was told by @NigelCunningham today that supporting this would mean he would not longer have to port https://www.drupal.org/project/ckeditor_no_autoparagraph to CKEditor 5 — and that by the way is based on https://drupal.stackexchange.com/questions/233283/how-to-remove-paragraph-tag-from-ckeditor#answer-253032.

@Reinmar
Copy link
Member

Reinmar commented May 9, 2022

I think this is a dup of #762. It's certainly doable and we've actually had a really promising PoC but never finished it.

@Reinmar Reinmar closed this as completed May 9, 2022
@Reinmar Reinmar added the resolution:duplicate This issue is a duplicate of another issue and was merged into it. label May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:duplicate This issue is a duplicate of another issue and was merged into it. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

No branches or pull requests

3 participants