Browse Source

Added: Font should require FontFamily & FontSize plugins.

Maciej Gołaszewski 8 years ago
parent
commit
2973857135
2 changed files with 5 additions and 3 deletions
  1. 3 2
      packages/ckeditor5-font/src/font.js
  2. 2 1
      packages/ckeditor5-font/tests/font.js

+ 3 - 2
packages/ckeditor5-font/src/font.js

@@ -9,12 +9,13 @@
 
 
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 
 
+import FontFamily from './fontfamily';
 import FontSize from './fontsize';
 import FontSize from './fontsize';
 
 
 /**
 /**
  * The Font plugin.
  * The Font plugin.
  *
  *
- * It requires {@link module:font/fontsize~FontSize} plugin.
+ * It requires {@link module:font/fontsize~FontSize} and {@link module:font/fontfamily~FontFamily} plugins.
  *
  *
  * @extends module:core/plugin~Plugin
  * @extends module:core/plugin~Plugin
  */
  */
@@ -23,7 +24,7 @@ export default class Font extends Plugin {
 	 * @inheritDoc
 	 * @inheritDoc
 	 */
 	 */
 	static get requires() {
 	static get requires() {
-		return [ FontSize ];
+		return [ FontFamily, FontSize ];
 	}
 	}
 
 
 	/**
 	/**

+ 2 - 1
packages/ckeditor5-font/tests/font.js

@@ -4,11 +4,12 @@
  */
  */
 
 
 import Font from './../src/font';
 import Font from './../src/font';
+import FontFamily from './../src/fontfamily';
 import FontSize from './../src/fontsize';
 import FontSize from './../src/fontsize';
 
 
 describe( 'Font', () => {
 describe( 'Font', () => {
 	it( 'requires FontSize', () => {
 	it( 'requires FontSize', () => {
-		expect( Font.requires ).to.deep.equal( [ FontSize ] );
+		expect( Font.requires ).to.deep.equal( [ FontFamily, FontSize ] );
 	} );
 	} );
 
 
 	it( 'defines plugin name', () => {
 	it( 'defines plugin name', () => {