From e216d5f2d23fe71c809757ea2f3f4d1e64431225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20Koszuli=C5=84ski?= Date: Wed, 24 Jan 2018 13:17:38 +0100 Subject: [PATCH] Internal: Updated schema use. See ckeditor/ckeditor5-engine#1234. --- tests/attributecommand.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/attributecommand.js b/tests/attributecommand.js index 37fae23..eae332e 100644 --- a/tests/attributecommand.js +++ b/tests/attributecommand.js @@ -33,16 +33,12 @@ describe( 'AttributeCommand', () => { isObject: true } ); - model.schema.on( 'checkAttribute', ( evt, args ) => { - const ctx = args[ 0 ]; - const attributeName = args[ 1 ]; - + model.schema.addAttributeCheck( ( ctx, attributeName ) => { // Allow 'bold' on p>$text. if ( ctx.endsWith( 'p $text' ) && attributeName == 'bold' ) { - evt.stop(); - evt.return = true; + return true; } - }, { priority: 'high' } ); + } ); } ); } );