8
0
Quellcode durchsuchen

Other: Added `pluginName` property to editing plugins.

Szymon Cofalik vor 6 Jahren
Ursprung
Commit
fb6119e09b

+ 7 - 0
packages/ckeditor5-image/src/image/imageediting.js

@@ -32,6 +32,13 @@ import ImageInsertCommand from './imageinsertcommand';
  * @extends module:core/plugin~Plugin
  */
 export default class ImageEditing extends Plugin {
+	/**
+	 * @inheritDoc
+	 */
+	static get pluginName() {
+		return 'ImageEditing';
+	}
+
 	/**
 	 * @inheritDoc
 	 */

+ 7 - 0
packages/ckeditor5-image/src/imagecaption/imagecaptionediting.js

@@ -20,6 +20,13 @@ import { captionElementCreator, getCaptionFromImage, matchImageCaption } from '.
  * @extends module:core/plugin~Plugin
  */
 export default class ImageCaptionEditing extends Plugin {
+	/**
+	 * @inheritDoc
+	 */
+	static get pluginName() {
+		return 'ImageCaptionEditing';
+	}
+
 	/**
 	 * @inheritDoc
 	 */

+ 7 - 0
packages/ckeditor5-image/src/imagetextalternative/imagetextalternativeediting.js

@@ -18,6 +18,13 @@ import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
  * @extends module:core/plugin~Plugin
  */
 export default class ImageTextAlternativeEditing extends Plugin {
+	/**
+	 * @inheritDoc
+	 */
+	static get pluginName() {
+		return 'ImageTextAlternativeEditing';
+	}
+
 	/**
 	 * @inheritDoc
 	 */

+ 4 - 0
packages/ckeditor5-image/tests/image/imageediting.js

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

+ 4 - 0
packages/ckeditor5-image/tests/imagecaption/imagecaptionediting.js

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

+ 4 - 0
packages/ckeditor5-image/tests/imagetextalternative/imagetextalternativeediting.js

@@ -20,6 +20,10 @@ describe( 'ImageTextAlternativeEditing', () => {
 			} );
 	} );
 
+	it( 'should have pluginName', () => {
+		expect( ImageTextAlternativeEditing.pluginName ).to.equal( 'ImageTextAlternativeEditing' );
+	} );
+
 	it( 'should register ImageAlternativeTextCommand', () => {
 		expect( editor.commands.get( 'imageTextAlternative' ) ).to.be.instanceOf( ImageTextAlternativeCommand );
 	} );