Sfoglia il codice sorgente

Other: Added `pluginName` property to editing plugin.

Szymon Cofalik 6 anni fa
parent
commit
c5fd35cff5

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

@@ -31,6 +31,13 @@ const EXTERNAL_LINKS_REGEXP = /^(https?:)?\/\//;
  * @extends module:core/plugin~Plugin
  */
 export default class LinkEditing extends Plugin {
+	/**
+	 * @inheritDoc
+	 */
+	static get pluginName() {
+		return 'LinkEditing';
+	}
+
 	/**
 	 * @inheritDoc
 	 */

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

@@ -37,6 +37,10 @@ describe( 'LinkEditing', () => {
 		editor.destroy();
 	} );
 
+	it( 'should have pluginName', () => {
+		expect( LinkEditing.pluginName ).to.equal( 'LinkEditing' );
+	} );
+
 	it( 'should be loaded', () => {
 		expect( editor.plugins.get( LinkEditing ) ).to.be.instanceOf( LinkEditing );
 	} );