瀏覽代碼

The indentBlock attribute formatting flag.

Kuba Niegowski 5 年之前
父節點
當前提交
c571167f7d
共有 2 個文件被更改,包括 4 次插入0 次删除
  1. 2 0
      packages/ckeditor5-indent/src/indentblock.js
  2. 2 0
      packages/ckeditor5-indent/tests/indentblock.js

+ 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' ) );
 		indentCommand.registerChildCommand( editor.commands.get( 'indentBlock' ) );
 		outdentCommand.registerChildCommand( editor.commands.get( 'outdentBlock' ) );
 		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( [ 'heading1' ], 'blockIndent' ) ).to.be.true;
 				expect( model.schema.checkAttribute( [ 'heading2' ], '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.checkAttribute( [ 'heading3' ], 'blockIndent' ) ).to.be.true;
+
+				expect( model.schema.getAttributeProperties( 'blockIndent' ) ).to.deep.equal( { isFormatting: true } );
 			} );
 			} );
 	} );
 	} );