-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
hgroup and summary do not accept heading elements #16947
Comments
The problem is in invalid configuration of the GHS ckeditor5/packages/ckeditor5-html-support/src/schemadefinitions.ts Lines 340 to 354 in 08270aa
It should be:
According to MDN it's not a regular container so it does not allow other containers and also it allows only headings and paragraphs inside. |
@niegowski That's great. Do you know how to fix the summary element as well? It should accept EITHER $text OR exactly 1 heading element. A little bit trickier. |
@jwylarsen, the specification allows more than one heading in the
It means that any number of heading elements is valid according to the specification, e.g. the following HTML is valid: <details>
<summary>
<em>Test</em>
<h2>Test</h2>
<strong>Test</strong>
<h3>Test</h3>
</summary>
<p>Lipsum</p>
</details> |
@Comandeer Good to know! I was just going off of what MDN said. Either way, I've submitted a PR to address both hgroup and summary issue here: #16951 |
Fix (html-support): hgroup and summary elements should work with source editing. Closes #16947.
📝 Provide detailed reproduction steps (if any)
✔️ Expected result
Code is preserved as written.
❌ Actual result
hgroup and summary elements are removed
❓ Possible solution
submitting PR to fix this in schema definitions
📃 Other details
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: