From 7a806b985062924e6cef32781c0b798b4ff3dcfc Mon Sep 17 00:00:00 2001 From: Mateusz Samsel Date: Mon, 8 Jul 2019 15:05:40 +0200 Subject: [PATCH] Add inline root to schema. --- src/model/model.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/model/model.js b/src/model/model.js index 61a6b73f0..d0330fef3 100644 --- a/src/model/model.js +++ b/src/model/model.js @@ -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.