Kaynağa Gözat

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

Piotrek Koszuliński 8 yıl önce
ebeveyn
işleme
c8de071746

+ 1 - 1
packages/ckeditor5-typing/src/deletecommand.js

@@ -147,7 +147,7 @@ export default class DeleteCommand extends Command {
 			return false;
 			return false;
 		}
 		}
 
 
-		if ( !model.schema.check( { name: 'paragraph', inside: limitElement.name } ) ) {
+		if ( !model.schema.checkChild( limitElement, 'paragraph' ) ) {
 			return false;
 			return false;
 		}
 		}
 
 

+ 1 - 1
packages/ckeditor5-typing/tests/deletecommand.js

@@ -244,7 +244,7 @@ describe( 'DeleteCommand', () => {
 		} );
 		} );
 
 
 		it( 'does not replace an element if a paragraph is not allowed in current position', () => {
 		it( 'does not replace an element if a paragraph is not allowed in current position', () => {
-			model.schema.dis.extend( 'paragraph', { allowIn: '$root' } );
+			model.schema.xdisallow( 'paragraph', { allowIn: '$root' } );
 
 
 			setData( model, '<heading1>[]</heading1>' );
 			setData( model, '<heading1>[]</heading1>' );