Skip to content

Commit

Permalink
Mentioned disallow rules in SchemaItemDefinition API docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
scofalik committed Jun 3, 2024
1 parent 66fc735 commit aafadce
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions packages/ckeditor5-engine/src/model/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1246,9 +1246,15 @@ export type SchemaCheckAttributeEvent = {
* * {@link ~SchemaItemDefinition#allowIn `allowIn`} – Defines in which other items this item will be allowed.
* * {@link ~SchemaItemDefinition#allowChildren `allowChildren`} – Defines which other items are allowed inside this item.
* * {@link ~SchemaItemDefinition#allowAttributes `allowAttributes`} – Defines allowed attributes of the given item.
* * {@link ~SchemaItemDefinition#allowContentOf `allowContentOf`} – Inherits "allowed children" from other items.
* * {@link ~SchemaItemDefinition#allowWhere `allowWhere`} – Inherits "allowed in" from other items.
* * {@link ~SchemaItemDefinition#allowAttributesOf `allowAttributesOf`} – Inherits attributes from other items.
* * {@link ~SchemaItemDefinition#disallowIn `disallowIn`} – Defines in which other items this item will be disallowed.
* * {@link ~SchemaItemDefinition#disallowChildren `disallowChildren`} – Defines which other items are disallowed inside this item.
* * {@link ~SchemaItemDefinition#disallowAttributes `disallowAttributes`} – Defines disallowed attributes of the given item.
* * {@link ~SchemaItemDefinition#allowContentOf `allowContentOf`} – Makes this item allow children that are also allowed in the
* specified items. This acknowledges disallow rules.
* * {@link ~SchemaItemDefinition#allowWhere `allowWhere`} – Makes this item allowed where the specified items are allowed. This
* acknowledges disallow rules.
* * {@link ~SchemaItemDefinition#allowAttributesOf `allowAttributesOf`} – Inherits attributes from other items. This acknowledges
* disallow rules.
* * {@link ~SchemaItemDefinition#inheritTypesFrom `inheritTypesFrom`} – Inherits `is*` properties of other items.
* * {@link ~SchemaItemDefinition#inheritAllFrom `inheritAllFrom`} –
* A shorthand for `allowContentOf`, `allowWhere`, `allowAttributesOf`, `inheritTypesFrom`.
Expand Down Expand Up @@ -1376,6 +1382,15 @@ export type SchemaCheckAttributeEvent = {
* } );
* ```
*
* Register `inlineImage` as a kind of an inline object but disallow it inside captions:
*
* ```ts
* schema.register( 'imageInline', {
* inheritAllFrom: '$inlineObject',
* disallowIn: [ 'caption' ]
* } );
* ```
*
* Make `listItem` inherit all from `$block` but also allow additional attributes:
*
* ```ts
Expand Down

0 comments on commit aafadce

Please sign in to comment.