瀏覽代碼

Added: Introduce FontFamily plugin.

Maciej Gołaszewski 8 年之前
父節點
當前提交
a0f42e7a9e
共有 2 個文件被更改,包括 49 次插入0 次删除
  1. 32 0
      packages/ckeditor5-font/src/fontfamily.js
  2. 17 0
      packages/ckeditor5-font/tests/fontfamily.js

+ 32 - 0
packages/ckeditor5-font/src/fontfamily.js

@@ -0,0 +1,32 @@
+/**
+ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+/**
+ * @module font/fontfamily
+ */
+
+import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
+import FontFamilyEditing from './fontfamily/fontfamilyediting';
+
+/**
+ * The Font Size plugin.
+ *
+ * @extends module:core/plugin~Plugin
+ */
+export default class FontFamily extends Plugin {
+	/**
+	 * @inheritDoc
+	 */
+	static get requires() {
+		return [ FontFamilyEditing ];
+	}
+
+	/**
+	 * @inheritDoc
+	 */
+	static get pluginName() {
+		return 'FontFamily';
+	}
+}

+ 17 - 0
packages/ckeditor5-font/tests/fontfamily.js

@@ -0,0 +1,17 @@
+/**
+ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+import FontFamily from './../src/fontfamily';
+import FontFamilyEditing from './../src/fontfamily/fontfamilyediting';
+
+describe( 'FontFamily', () => {
+	it( 'requires FontFamilyEditing', () => {
+		expect( FontFamily.requires ).to.deep.equal( [ FontFamilyEditing ] );
+	} );
+
+	it( 'defines plugin name', () => {
+		expect( FontFamily.pluginName ).to.equal( 'FontFamily' );
+	} );
+} );