-
Notifications
You must be signed in to change notification settings - Fork 40
Added objects handling to modifySelection method #709
Conversation
document.schema.registerItem( 'p', '$block' ); | ||
document.schema.registerItem( 'x', '$block' ); | ||
document.schema.registerItem( 'img', '$inline' ); | ||
document.schema.registerItem( 'b', '$inline' ); |
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 is confusing. We don't have inline containers in the model. <b>
should rather be an attribute. This test:
<p>foo<b>[]</b><inlineObj>bar</inlineObj></p>
have no sense. In the paragraph you can either have text or inline objects.
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.
BTW. It's better to have many schema definitions – one per some describe()
block. It's then easier to remember all setting for each block. E.g. you can move the additional setting to the newly added describe()
(and keep the rest here for all tests).
describe( 'objects handling', () => { | ||
test( | ||
'extends over next object element when at the end of an element', | ||
'<p>foo[]</p><obj>bar</obj>', |
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 miss a test case for <blockquote><p>foo[]</p></blockquote><obj></obj>
.
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 looks like a bigger case and it will be handled separately.
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 left 3 comments.
Fixes ckeditor/ckeditor5#3904.