8
0
Просмотр исходного кода

Renamed InsertMediaCommand->MediaEmbedCommand.

Aleksander Nowodzinski 7 лет назад
Родитель
Сommit
a237659982

+ 1 - 1
packages/ckeditor5-media-embed/docs/features/media-embed.md

@@ -73,7 +73,7 @@ To satisfy most of the use–cases, the feature can be configured using the {@li
 
 
 The {@link module:media-embed/mediaembed~MediaEmbed} plugin registers:
 The {@link module:media-embed/mediaembed~MediaEmbed} plugin registers:
 * the `'mediaEmbed'` UI button component,
 * the `'mediaEmbed'` UI button component,
-* the `'mediaEmbed'` command implemented by {@link module:media-embed/insertmediacommand~InsertMediaCommand}.
+* the `'mediaEmbed'` command implemented by {@link module:media-embed/mediaembedcommand~MediaEmbedCommand}.
 
 
 	You can insert a new media or update the selected media URL by executing the following code:
 	You can insert a new media or update the selected media URL by executing the following code:
 
 

+ 2 - 2
packages/ckeditor5-media-embed/src/insertmediacommand.js → packages/ckeditor5-media-embed/src/mediaembedcommand.js

@@ -4,7 +4,7 @@
  */
  */
 
 
 /**
 /**
- * @module media-embed/insertmediacommand
+ * @module media-embed/mediaembedcommand
  */
  */
 
 
 import Command from '@ckeditor/ckeditor5-core/src/command';
 import Command from '@ckeditor/ckeditor5-core/src/command';
@@ -22,7 +22,7 @@ import { getSelectedMediaElement } from './utils';
  *
  *
  * @extends module:core/command~Command
  * @extends module:core/command~Command
  */
  */
-export default class InsertMediaCommand extends Command {
+export default class MediaEmbedCommand extends Command {
 	/**
 	/**
 	 * @inheritDoc
 	 * @inheritDoc
 	 */
 	 */

+ 2 - 2
packages/ckeditor5-media-embed/src/mediaembedediting.js

@@ -10,7 +10,7 @@
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 
 
 import { modelToViewUrlAttributeConverter } from './converters';
 import { modelToViewUrlAttributeConverter } from './converters';
-import InsertMediaCommand from './insertmediacommand';
+import MediaEmbedCommand from './mediaembedcommand';
 import { toMediaWidget, createMediaFigureElement } from './utils';
 import { toMediaWidget, createMediaFigureElement } from './utils';
 import { MediaRegistry } from './mediaregistry';
 import { MediaRegistry } from './mediaregistry';
 import { downcastElementToElement } from '@ckeditor/ckeditor5-engine/src/conversion/downcast-converters';
 import { downcastElementToElement } from '@ckeditor/ckeditor5-engine/src/conversion/downcast-converters';
@@ -120,7 +120,7 @@ export default class MediaEmbedEditing extends Plugin {
 		const semanticDataOutput = editor.config.get( 'mediaEmbed.semanticDataOutput' );
 		const semanticDataOutput = editor.config.get( 'mediaEmbed.semanticDataOutput' );
 		const mediaRegistry = this.mediaRegistry;
 		const mediaRegistry = this.mediaRegistry;
 
 
-		editor.commands.add( 'mediaEmbed', new InsertMediaCommand( editor ) );
+		editor.commands.add( 'mediaEmbed', new MediaEmbedCommand( editor ) );
 
 
 		// Configure the schema.
 		// Configure the schema.
 		schema.register( 'media', {
 		schema.register( 'media', {

+ 3 - 3
packages/ckeditor5-media-embed/tests/insertmediacommand.js

@@ -6,9 +6,9 @@
 import ModelTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/modeltesteditor';
 import ModelTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/modeltesteditor';
 import { setData, getData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
 import { setData, getData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
 import MediaEmbedEditing from '../src/mediaembedediting';
 import MediaEmbedEditing from '../src/mediaembedediting';
-import InsertMediaCommand from '../src/insertmediacommand';
+import MediaEmbedCommand from '../src/mediaembedcommand';
 
 
-describe( 'InsertMediaCommand', () => {
+describe( 'MediaEmbedCommand', () => {
 	let editor, model, command;
 	let editor, model, command;
 
 
 	beforeEach( () => {
 	beforeEach( () => {
@@ -19,7 +19,7 @@ describe( 'InsertMediaCommand', () => {
 			.then( newEditor => {
 			.then( newEditor => {
 				editor = newEditor;
 				editor = newEditor;
 				model = editor.model;
 				model = editor.model;
-				command = new InsertMediaCommand( editor );
+				command = new MediaEmbedCommand( editor );
 
 
 				model.schema.register( 'p', { inheritAllFrom: '$block' } );
 				model.schema.register( 'p', { inheritAllFrom: '$block' } );
 			} );
 			} );

+ 1 - 1
packages/ckeditor5-media-embed/tests/mediaembedui.js

@@ -43,7 +43,7 @@ describe( 'MediaEmbedUI', () => {
 		return editor.destroy();
 		return editor.destroy();
 	} );
 	} );
 
 
-	it( 'should add the "insertMedia" component to the factory', () => {
+	it( 'should add the "mediaEmbed" component to the factory', () => {
 		expect( dropdown ).to.be.instanceOf( DropdownView );
 		expect( dropdown ).to.be.instanceOf( DropdownView );
 	} );
 	} );