Przeglądaj źródła

Change default indentation unit to px and step to 40.

Maciej Gołaszewski 6 lat temu
rodzic
commit
67c4d4cb5c

+ 4 - 4
packages/ckeditor5-indent/src/indentblock.js

@@ -31,8 +31,8 @@ export default class IndentBlock extends Plugin {
 		super( editor );
 
 		editor.config.define( 'indentBlock', {
-			offset: 1,
-			unit: 'em'
+			offset: 40,
+			unit: 'px'
 		} );
 	}
 
@@ -247,14 +247,14 @@ function normalizeToMarginLeftStyle( marginStyleValue ) {
 /**
  * The size in indentation {@link module:indent/indentblock~IndentBlockConfig#unit units} of each indentation step.
  *
- * @default 1
+ * @default 40
  * @member {Number} module:indent/indentblock~IndentBlockConfig#offset
  */
 
 /**
  * The unit used for indentation {@link module:indent/indentblock~IndentBlockConfig#offset}.
  *
- * @default 'em'
+ * @default 'px'
  * @member {String} module:indent/indentblock~IndentBlockConfig#unit
  */
 

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

@@ -8,7 +8,6 @@ import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
 import { getData as getViewData } from '@ckeditor/ckeditor5-engine/src/dev-utils/view';
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 import HeadingEditing from '@ckeditor/ckeditor5-heading/src/headingediting';
-import { getCode } from '@ckeditor/ckeditor5-utils/src/keyboard';
 
 import IndentEditing from '../src/indentediting';
 import IndentBlock from '../src/indentblock';
@@ -61,7 +60,7 @@ describe( 'IndentBlock', () => {
 		describe( 'default value', () => {
 			it( 'should be set', () => {
 				return createTestEditor().then( editor => {
-					expect( editor.config.get( 'indentBlock' ) ).to.deep.equal( { offset: 1, unit: 'em' } );
+					expect( editor.config.get( 'indentBlock' ) ).to.deep.equal( { offset: 40, unit: 'px' } );
 				} );
 			} );
 		} );