Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Add inline root to schema.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Samsel committed Jul 8, 2019
1 parent 4499b1b commit 7a806b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/model/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,23 @@ export default class Model {
this.schema.register( '$root', {
isLimit: true
} );
this.schema.register( '$inlineRoot', {
isLimit: true,
isInline: true
} );
this.schema.register( '$block', {
allowIn: '$root',
isBlock: true
} );
this.schema.register( '$text', {
allowIn: '$block',
allowIn: [ '$block', '$inlineRoot' ],
isInline: true
} );
this.schema.register( '$clipboardHolder', {
allowContentOf: '$root',
isLimit: true
} );

this.schema.extend( '$text', { allowIn: '$clipboardHolder' } );

// An element needed by the `upcastElementToMarker` converter.
Expand Down

0 comments on commit 7a806b9

Please sign in to comment.