Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Internal: Updated schema use. See ckeditor/ckeditor5-engine#1234.
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Jan 24, 2018
1 parent 6ea4f08 commit e216d5f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/attributecommand.js
Expand Up @@ -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' } );
} );
} );
} );

Expand Down

0 comments on commit e216d5f

Please sign in to comment.