Add EmptyBlock plugin that prevents adding in exported data. #17756
Add EmptyBlock plugin that prevents adding in exported data. #17756
EmptyBlock plugin that prevents adding in exported data. #17756Conversation
EmptyBlocks plugin that allows for preserving empty block elements in the editor.EmptyBlocks plugin that prevents adding in exported data.
niegowski
left a comment
There was a problem hiding this comment.
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.
I'd expect the output would not have an empty <p> as there wasn't one in the input.
|
@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. |
| 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.
| * 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.
@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.
There was a problem hiding this comment.
Maybe similar to the ones before?
The configuration of whether a non-breaking space ( ) is added to empty block elements in the editing output.
|
@niegowski Renamed config option |
|
Merged, potential followups will be done in separate PRs |

Suggested merge commit message (convention)
Feature (html-support): Add an experimental
EmptyBlockplugin 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