Bläddra i källkod

First batch of changes updating schema use to match the new API.

Piotrek Koszuliński 8 år sedan
förälder
incheckning
0889288006

+ 1 - 1
packages/ckeditor5-core/tests/_utils-tests/classictesteditor.js

@@ -81,7 +81,7 @@ describe( 'ClassicTestEditor', () => {
 
 			class PluginTextInRoot extends Plugin {
 				init() {
-					this.editor.model.schema.allow( { name: '$text', inside: '$root' } );
+					this.editor.model.schema.extend( '$text', { allowIn: '$root' } );
 				}
 			}
 

+ 2 - 2
packages/ckeditor5-core/tests/_utils-tests/modeltesteditor.js

@@ -76,7 +76,7 @@ describe( 'ModelTestEditor', () => {
 				.then( newEditor => {
 					editor = newEditor;
 
-					editor.model.schema.allow( { name: '$text', inside: '$root' } );
+					editor.model.schema.extend( '$text', { allowIn: '$root' } );
 				} );
 		} );
 
@@ -97,7 +97,7 @@ describe( 'ModelTestEditor', () => {
 				.then( newEditor => {
 					editor = newEditor;
 
-					editor.model.schema.allow( { name: '$text', inside: '$root' } );
+					editor.model.schema.extend( '$text', { allowIn: '$root' } );
 				} );
 		} );
 

+ 2 - 2
packages/ckeditor5-core/tests/editor/standardeditor.js

@@ -148,7 +148,7 @@ describe( 'StandardEditor', () => {
 
 					editor.data.processor = new HtmlDataProcessor();
 
-					editor.model.schema.allow( { name: '$text', inside: '$root' } );
+					editor.model.schema.extend( '$text', { allowIn: '$root' } );
 				} );
 		} );
 
@@ -175,7 +175,7 @@ describe( 'StandardEditor', () => {
 
 					editor.data.processor = new HtmlDataProcessor();
 
-					editor.model.schema.allow( { name: '$text', inside: '$root' } );
+					editor.model.schema.extend( '$text', { allowIn: '$root' } );
 				} );
 		} );