瀏覽代碼

Internal: Added names to the plugins that expose a public API (see ckeditor/ckeditor5#1336).

Aleksander Nowodzinski 6 年之前
父節點
當前提交
d9f759dfd8
共有 2 個文件被更改,包括 11 次插入0 次删除
  1. 7 0
      packages/ckeditor5-link/src/linkui.js
  2. 4 0
      packages/ckeditor5-link/tests/linkui.js

+ 7 - 0
packages/ckeditor5-link/src/linkui.js

@@ -41,6 +41,13 @@ export default class LinkUI extends Plugin {
 	/**
 	 * @inheritDoc
 	 */
+	static get pluginName() {
+		return 'LinkUI';
+	}
+
+	/**
+	 * @inheritDoc
+	 */
 	init() {
 		const editor = this.editor;
 

+ 4 - 0
packages/ckeditor5-link/tests/linkui.js

@@ -57,6 +57,10 @@ describe( 'LinkUI', () => {
 		return editor.destroy();
 	} );
 
+	it( 'should be named', () => {
+		expect( LinkUI.pluginName ).to.equal( 'LinkUI' );
+	} );
+
 	it( 'should load ContextualBalloon', () => {
 		expect( editor.plugins.get( ContextualBalloon ) ).to.be.instanceOf( ContextualBalloon );
 	} );