浏览代码

Merge branch 'master' into t/ckeditor5/645

Aleksander Nowodzinski 7 年之前
父节点
当前提交
e7f465aef1
共有 1 个文件被更改,包括 3 次插入7 次删除
  1. 3 7
      packages/ckeditor5-basic-styles/tests/attributecommand.js

+ 3 - 7
packages/ckeditor5-basic-styles/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' } );
+				} );
 			} );
 	} );