Browse Source

Renamed configuration option.

Kamil Piechaczek 7 years ago
parent
commit
b54c1c0b3e

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

@@ -55,7 +55,7 @@ ClassicEditor
 
 
 ### Data output format
 ### Data output format
 
 
-The data output format of the feature can be configured using the {@link module:media-embed/mediaembed~MediaEmbedConfig#mediaPreviewsInData `config.mediaEmbed.mediaPreviewsInData`} option.
+The data output format of the feature can be configured using the {@link module:media-embed/mediaembed~MediaEmbedConfig#previewsInData `config.mediaEmbed.previewsInData`} option.
 
 
 <info-box info>
 <info-box info>
 	This option does not change how media are displayed inside the editor – the previewable ones will still be displayed with previews. It only affects the output data (see below).
 	This option does not change how media are displayed inside the editor – the previewable ones will still be displayed with previews. It only affects the output data (see below).
@@ -73,7 +73,7 @@ By default, the media embed feature outputs semantic `<oembed>` tags for preview
 
 
 #### Including previews in data
 #### Including previews in data
 
 
-Optionally, by setting `mediaEmbed.mediaPreviewsInData` to `true` you can configure the media embed feature to output media in the same way they look in the editor, this is, if this media is "previewable", the media preview (HTML) is saved to the database:
+Optionally, by setting `mediaEmbed.previewsInData` to `true` you can configure the media embed feature to output media in the same way they look in the editor, this is, if this media is "previewable", the media preview (HTML) is saved to the database:
 
 
 ```html
 ```html
 <figure class="media">
 <figure class="media">

+ 4 - 4
packages/ckeditor5-media-embed/src/mediaembed.js

@@ -100,7 +100,7 @@ export default class MediaEmbed extends Plugin {
  * preview of a media identified by a certain id or a hash. When not defined, the media embed feature
  * preview of a media identified by a certain id or a hash. When not defined, the media embed feature
  * will use a generic media representation in the view and output data.
  * will use a generic media representation in the view and output data.
  * Note that when
  * Note that when
- * {@link module:media-embed/mediaembed~MediaEmbedConfig#mediaPreviewsInData `config.mediaEmbed.mediaPreviewsInData`}
+ * {@link module:media-embed/mediaembed~MediaEmbedConfig#previewsInData `config.mediaEmbed.previewsInData`}
  * is `true`, the rendering function **will always** be used for the media in the editor data output.
  * is `true`, the rendering function **will always** be used for the media in the editor data output.
  */
  */
 
 
@@ -154,7 +154,7 @@ export default class MediaEmbed extends Plugin {
  * only the most common are included.
  * only the most common are included.
  *
  *
  * **Note**: Media without are always represented in the data using the "semantic" markup. See
  * **Note**: Media without are always represented in the data using the "semantic" markup. See
- * {@link module:media-embed/mediaembed~MediaEmbedConfig#mediaPreviewsInData `config.mediaEmbed.mediaPreviewsInData`} to
+ * {@link module:media-embed/mediaembed~MediaEmbedConfig#previewsInData `config.mediaEmbed.previewsInData`} to
  * learn more about possible data outputs.
  * learn more about possible data outputs.
  *
  *
  * **Note:**: The priority of media providers corresponds to the order of configuration. The first provider
  * **Note:**: The priority of media providers corresponds to the order of configuration. The first provider
@@ -251,9 +251,9 @@ export default class MediaEmbed extends Plugin {
  *		</figure>
  *		</figure>
  *
  *
  * **Note:** Preview–less media are always represented in the data using the "semantic" markup
  * **Note:** Preview–less media are always represented in the data using the "semantic" markup
- * regardless of the value of the `mediaPreviewsInData`. Learn more about different kinds of media
+ * regardless of the value of the `previewsInData`. Learn more about different kinds of media
  * in the {@link module:media-embed/mediaembed~MediaEmbedConfig#providers `config.mediaEmbed.providers`}
  * in the {@link module:media-embed/mediaembed~MediaEmbedConfig#providers `config.mediaEmbed.providers`}
  * configuration description.
  * configuration description.
  *
  *
- * @member {Boolean} [module:media-embed/mediaembed~MediaEmbedConfig#mediaPreviewsInData=false]
+ * @member {Boolean} [module:media-embed/mediaembed~MediaEmbedConfig#previewsInData=false]
  */
  */

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

@@ -156,7 +156,7 @@ export default class MediaEmbedEditing extends Plugin {
 		const schema = editor.model.schema;
 		const schema = editor.model.schema;
 		const t = editor.t;
 		const t = editor.t;
 		const conversion = editor.conversion;
 		const conversion = editor.conversion;
-		const renderMediaPreview = editor.config.get( 'mediaEmbed.mediaPreviewsInData' );
+		const renderMediaPreview = editor.config.get( 'mediaEmbed.previewsInData' );
 		const registry = this.registry;
 		const registry = this.registry;
 
 
 		editor.commands.add( 'mediaEmbed', new MediaEmbedCommand( editor ) );
 		editor.commands.add( 'mediaEmbed', new MediaEmbedCommand( editor ) );

+ 1 - 1
packages/ckeditor5-media-embed/tests/manual/mediaembed.js

@@ -16,7 +16,7 @@ ClassicEditor
 			'heading', '|', 'mediaEmbed', '|', 'bold', 'italic', 'bulletedList', 'numberedList', 'blockQuote', 'link', 'undo', 'redo'
 			'heading', '|', 'mediaEmbed', '|', 'bold', 'italic', 'bulletedList', 'numberedList', 'blockQuote', 'link', 'undo', 'redo'
 		],
 		],
 		mediaEmbed: {
 		mediaEmbed: {
-			mediaPreviewsInData: true
+			previewsInData: true
 		}
 		}
 	} )
 	} )
 	.then( editor => {
 	.then( editor => {

+ 6 - 6
packages/ckeditor5-media-embed/tests/mediaembedediting.js

@@ -473,7 +473,7 @@ describe( 'MediaEmbedEditing', () => {
 		} );
 		} );
 
 
 		describe( 'conversion in the data pipeline', () => {
 		describe( 'conversion in the data pipeline', () => {
-			describe( 'mediaPreviewsInData=false', () => {
+			describe( 'previewsInData=false', () => {
 				beforeEach( () => {
 				beforeEach( () => {
 					return createTestEditor( {
 					return createTestEditor( {
 						providers: providerDefinitions
 						providers: providerDefinitions
@@ -618,11 +618,11 @@ describe( 'MediaEmbedEditing', () => {
 				} );
 				} );
 			} );
 			} );
 
 
-			describe( 'mediaPreviewsInData=true', () => {
+			describe( 'previewsInData=true', () => {
 				beforeEach( () => {
 				beforeEach( () => {
 					return createTestEditor( {
 					return createTestEditor( {
 						providers: providerDefinitions,
 						providers: providerDefinitions,
-						mediaPreviewsInData: true
+						previewsInData: true
 					} )
 					} )
 						.then( newEditor => {
 						.then( newEditor => {
 							editor = newEditor;
 							editor = newEditor;
@@ -791,7 +791,7 @@ describe( 'MediaEmbedEditing', () => {
 		} );
 		} );
 
 
 		describe( 'conversion in the editing pipeline', () => {
 		describe( 'conversion in the editing pipeline', () => {
-			describe( 'mediaPreviewsInData=false', () => {
+			describe( 'previewsInData=false', () => {
 				beforeEach( () => {
 				beforeEach( () => {
 					return createTestEditor( {
 					return createTestEditor( {
 						providers: providerDefinitions
 						providers: providerDefinitions
@@ -807,11 +807,11 @@ describe( 'MediaEmbedEditing', () => {
 				test();
 				test();
 			} );
 			} );
 
 
-			describe( 'mediaPreviewsInData=true', () => {
+			describe( 'previewsInData=true', () => {
 				beforeEach( () => {
 				beforeEach( () => {
 					return createTestEditor( {
 					return createTestEditor( {
 						providers: providerDefinitions,
 						providers: providerDefinitions,
-						mediaPreviewsInData: true
+						previewsInData: true
 					} )
 					} )
 						.then( newEditor => {
 						.then( newEditor => {
 							editor = newEditor;
 							editor = newEditor;