You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's no use doing big changes or refactoring if we plan to write it from scratch and we haven't really make any decision how it will look.
However, there is one improvement needed right one. If DocumentSelection stores an attribute in an element, that element will not be allowed anywhere, unless we explicitly call Schema.allow().
This is a problem, because a paragraph element with selection:bold attribute is suddenly not allowed in blockquote.
To make it all more managable, the skip would only be implemented in "allow" part of algorithm. That is, you won't have to write things like
As we all know,
Schema
is not perfect.There's no use doing big changes or refactoring if we plan to write it from scratch and we haven't really make any decision how it will look.
However, there is one improvement needed right one. If
DocumentSelection
stores an attribute in an element, that element will not be allowed anywhere, unless we explicitly callSchema.allow()
.This is a problem, because a
paragraph
element withselection:bold
attribute is suddenly not allowed inblockquote
.To make it all more managable, the skip would only be implemented in "allow" part of algorithm. That is, you won't have to write things like
schema.allow( { name: '$block', attributes: [ 'selection:bold' ], inside: 'blockquote' } )
but you will be able to do
schema.disallow( { name: '$block', attributes: [ 'selection:bold' ], inside: 'blockquote' } )
;It is better and easier to disallow one specific thing than writing all allow rules that would grow bigger with every added feature.
The text was updated successfully, but these errors were encountered: