ソースを参照

The indentBlock attribute formatting flag.

Kuba Niegowski 5 年 前
コミット
c571167f7d

+ 2 - 0
packages/ckeditor5-indent/src/indentblock.js

@@ -88,6 +88,8 @@ export default class IndentBlock extends Plugin {
 			}
 		} );
 
+		schema.setAttributeProperties( 'blockIndent', { isFormatting: true } );
+
 		indentCommand.registerChildCommand( editor.commands.get( 'indentBlock' ) );
 		outdentCommand.registerChildCommand( editor.commands.get( 'outdentBlock' ) );
 	}

+ 2 - 0
packages/ckeditor5-indent/tests/indentblock.js

@@ -44,6 +44,8 @@ describe( 'IndentBlock', () => {
 				expect( model.schema.checkAttribute( [ 'heading1' ], 'blockIndent' ) ).to.be.true;
 				expect( model.schema.checkAttribute( [ 'heading2' ], 'blockIndent' ) ).to.be.true;
 				expect( model.schema.checkAttribute( [ 'heading3' ], 'blockIndent' ) ).to.be.true;
+
+				expect( model.schema.getAttributeProperties( 'blockIndent' ) ).to.deep.equal( { isFormatting: true } );
 			} );
 	} );