-
-
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
Add EmptyBlock
plugin that prevents adding
in exported data.
#17756
base: master
Are you sure you want to change the base?
Conversation
EmptyBlocks
plugin that allows for preserving empty block elements in the editor.EmptyBlocks
plugin that prevents adding
in exported data.
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.
Apart from the comments below, the clipboard integration is missing.
b1e0b3b
to
e57d7f5
Compare
Please link to API docs of this plugin in the table: Mention from which version available. |
packages/ckeditor5-table/src/converters/table-cell-paragraph-post-fixer.ts
Outdated
Show resolved
Hide resolved
'<paragraph htmlEmptyBlock="true" listIndent="0" listType="bulleted"></paragraph>' | ||
); | ||
|
||
expect( editor.getData() ).to.equal( '<p>A</p><ul><li><p></p></li></ul>' ); |
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.
I'd expect the output would not have an empty <p>
as there wasn't one in the input.
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.
Works as intended 👍
@niegowski Can you check? Merging is blocked without your approval. |
d8cafb7
@niegowski CR remarks applied. |
packages/ckeditor5-html-support/src/generalhtmlsupportconfig.ts
Outdated
Show resolved
Hide resolved
@niegowski CR remarks applied. |
@@ -80,4 +80,21 @@ export interface GeneralHtmlSupportConfig { | |||
* ``` | |||
*/ | |||
allowEmpty?: Array<string>; | |||
|
|||
/** | |||
* Whether a filler text (non-breaking space entity — ) will be inserted into empty block elements in HTML output. |
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.
* Whether a filler text (non-breaking space entity — ) will be inserted into empty block elements in HTML output. | |
* Whether a filler text (non-breaking space entity — ` `) will be inserted into empty block elements in HTML output. |
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.
@Witoso could you check if this config description is clear enough? Note that the feature is enabled by including the plugin itself and this config refers to the alternative mode in the editing pipeline.
Suggested merge commit message (convention)
Feature (html-support): Add an experimental
EmptyBlock
plugin that prevents adding
to output data.Other (engine): The whitespaces around a block filler (
) are ignored while loading editor data.Additional information
It's part of https://github.com/cksource/ckeditor5-commercial/pull/6942
Original issue https://github.com/cksource/ckeditor5-commercial/issues/6941
More details: Notion