Procházet zdrojové kódy

Other: Added `pluginName` property to editing plugins.

Szymon Cofalik před 6 roky
rodič
revize
8836c57686

+ 7 - 0
packages/ckeditor5-basic-styles/src/bold/boldediting.js

@@ -24,6 +24,13 @@ export default class BoldEditing extends Plugin {
 	/**
 	 * @inheritDoc
 	 */
+	static get pluginName() {
+		return 'BoldEditing';
+	}
+
+	/**
+	 * @inheritDoc
+	 */
 	init() {
 		const editor = this.editor;
 		// Allow bold attribute on text nodes.

+ 7 - 0
packages/ckeditor5-basic-styles/src/code/codeediting.js

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

+ 7 - 0
packages/ckeditor5-basic-styles/src/italic/italicediting.js

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

+ 7 - 0
packages/ckeditor5-basic-styles/src/strikethrough/strikethroughediting.js

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

+ 7 - 0
packages/ckeditor5-basic-styles/src/subscript/subscriptediting.js

@@ -24,6 +24,13 @@ export default class SubscriptEditing extends Plugin {
 	/**
 	 * @inheritDoc
 	 */
+	static get pluginName() {
+		return 'SubscriptEditing';
+	}
+
+	/**
+	 * @inheritDoc
+	 */
 	init() {
 		const editor = this.editor;
 		// Allow sub attribute on text nodes.

+ 7 - 0
packages/ckeditor5-basic-styles/src/superscript/superscriptediting.js

@@ -24,6 +24,13 @@ export default class SuperscriptEditing extends Plugin {
 	/**
 	 * @inheritDoc
 	 */
+	static get pluginName() {
+		return 'SuperscriptEditing';
+	}
+
+	/**
+	 * @inheritDoc
+	 */
 	init() {
 		const editor = this.editor;
 		// Allow super attribute on text nodes.

+ 7 - 0
packages/ckeditor5-basic-styles/src/underline/underlineediting.js

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

+ 4 - 0
packages/ckeditor5-basic-styles/tests/bold/boldediting.js

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

+ 4 - 0
packages/ckeditor5-basic-styles/tests/code/codeediting.js

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

+ 4 - 0
packages/ckeditor5-basic-styles/tests/italic/italicediting.js

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

+ 4 - 0
packages/ckeditor5-basic-styles/tests/strikethrough/strikethroughediting.js

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

+ 4 - 0
packages/ckeditor5-basic-styles/tests/subscript/subscriptediting.js

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

+ 4 - 0
packages/ckeditor5-basic-styles/tests/superscript/superscriptediting.js

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

+ 4 - 0
packages/ckeditor5-basic-styles/tests/underline/underlineediting.js

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