-
-
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
[GHS] custom elements #11744
[GHS] custom elements #11744
Conversation
@@ -465,6 +465,11 @@ export function convertText() { | |||
return; | |||
} | |||
|
|||
// Do not auto-paragraph whitespaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks the following test:
ckeditor5/packages/ckeditor5-engine/tests/view/domconverter/whitespace-handling-integration.js
Line 110 in 30286f7
it( 'nbsp between blocks is not ignored (between paragraphs)', () => { |
We need to choose to either trim that nbsp in that case or correctly handle scenarios like:
<custom>x</custom>
<custom someattr></custom>
where the space (normal space) should be trimmed.
Unfortunately, since these are custom elements we can't easily make the decision on DOM->view conversion whether these are spaces between block or inline elements.
Additionally, unfortunately we lose the information whether this was an nbsp or normal space upon DOM->view conversion. Currently, all are normalized to normal spaces at this stage. if they weren't, the below code would actually correctly differentiate these situation.
Hence, we need to:
- either lose intentional nbsps between blocks (may happen in HTML generated by external tools)
- or make sure custom elements don't break things
This reverts commit cc5c341.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
Suggested merge commit message (convention)
Feature (html-support): Custom elements should be preserved by GHS. Closes #11432.
Fix (engine): Whitespaces between block elements should not trigger auto-paragraphing. Closes #11248.
Additional information