This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
T/404: Better handling of block filler. #1779
T/404: Better handling of block filler. #1779
Changes from 27 commits
c15a2b7
63e81a5
fd2ae41
fd76bf2
be11659
f9f89ae
0ac3b6b
2e9d550
92da88e
2daf569
86a8970
600dacb
6053e18
86eb560
9ba5731
37aec88
c782dc9
d55bbde
e5c7361
1012605
dbecbf1
529a95d
c62a9fd
75bad14
326372c
a9f4b7a
0a82f09
d9dbda2
d370947
23b1b79
fc769ff
fa8ccb6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
@Reinmar I don't like that this duplicates the code from a
DomConverter
- maybe we should intorduceisBlockElement()
in ckeditor5-utisl/dom? That this could be unified there.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.
We should use the same block elements array which is defined in
DomConverter
. The idea is that it can be extended by someone else if needed. So, we need to find a way to makefiller.js
us that property.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.
One option would be to have a module here (in the engine) which exports a table.
This module would be imported by both
domconverter.js
andfiller.js
. The instance of this array would be shared by those modules. So, if you'd extendDomConverter.blockElementNames
that'd also extend the value used by thefiller.js
module.The downside of this would be that this would become a singleton. All editor instances would share this table. In fact, that'd mean that if you'd like to extend this array in your plugin's code (cause it adds some new element support to the editor), if you'd run 10 editors on one page, this element would be added 10 times. That's quite ugly.
So, I'd rather go in a different direction – e.g. move
isBlockFiller()
toDomConverter
. Perhaps it doesn't make sense to have this as contextless util. Maybe it needs to be a part of bigger context.