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

Merge pull request #10 from ckeditor/t/ckeditor5-engine/467

Renamed converter builders
Szymon Cofalik 9 лет назад
Родитель
Сommit
89e4086a45

+ 4 - 4
packages/ckeditor5-basic-styles/src/boldengine.js

@@ -4,8 +4,8 @@
  */
  */
 
 
 import Feature from '../feature.js';
 import Feature from '../feature.js';
-import BuildModelConverterFor from '../engine/conversion/model-converter-builder.js';
-import BuildViewConverterFor from '../engine/conversion/view-converter-builder.js';
+import buildModelConverter from '../engine/conversion/buildmodelconverter.js';
+import buildViewConverter from '../engine/conversion/buildviewconverter.js';
 import AttributeCommand from '../command/attributecommand.js';
 import AttributeCommand from '../command/attributecommand.js';
 
 
 const BOLD = 'bold';
 const BOLD = 'bold';
@@ -20,12 +20,12 @@ export default class BoldEngine extends Feature {
 		editor.document.schema.allow( { name: '$inline', attributes: [ BOLD ] } );
 		editor.document.schema.allow( { name: '$inline', attributes: [ BOLD ] } );
 
 
 		// Build converter from model to view for data and editing pipelines.
 		// Build converter from model to view for data and editing pipelines.
-		BuildModelConverterFor( data.modelToView, editing.modelToView )
+		buildModelConverter().for( data.modelToView, editing.modelToView )
 			.fromAttribute( BOLD )
 			.fromAttribute( BOLD )
 			.toElement( 'strong' );
 			.toElement( 'strong' );
 
 
 		// Build converter from view to model for data pipeline.
 		// Build converter from view to model for data pipeline.
-		BuildViewConverterFor( data.viewToModel )
+		buildViewConverter().for( data.viewToModel )
 			.fromElement( 'strong' )
 			.fromElement( 'strong' )
 			.fromElement( 'b' )
 			.fromElement( 'b' )
 			.fromAttribute( 'style', { 'font-weight': 'bold' } )
 			.fromAttribute( 'style', { 'font-weight': 'bold' } )

+ 4 - 4
packages/ckeditor5-basic-styles/src/italicengine.js

@@ -4,8 +4,8 @@
  */
  */
 
 
 import Feature from '../feature.js';
 import Feature from '../feature.js';
-import BuildModelConverterFor from '../engine/conversion/model-converter-builder.js';
-import BuildViewConverterFor from '../engine/conversion/view-converter-builder.js';
+import buildModelConverter from '../engine/conversion/buildmodelconverter.js';
+import buildViewConverter from '../engine/conversion/buildviewconverter.js';
 import AttributeCommand from '../command/attributecommand.js';
 import AttributeCommand from '../command/attributecommand.js';
 
 
 const ITALIC = 'italic';
 const ITALIC = 'italic';
@@ -20,12 +20,12 @@ export default class ItalicEngine extends Feature {
 		editor.document.schema.allow( { name: '$inline', attributes: [ ITALIC ] } );
 		editor.document.schema.allow( { name: '$inline', attributes: [ ITALIC ] } );
 
 
 		// Build converter from model to view for data and editing pipelines.
 		// Build converter from model to view for data and editing pipelines.
-		BuildModelConverterFor( data.modelToView, editing.modelToView )
+		buildModelConverter().for( data.modelToView, editing.modelToView )
 			.fromAttribute( ITALIC )
 			.fromAttribute( ITALIC )
 			.toElement( 'em' );
 			.toElement( 'em' );
 
 
 		// Build converter from view to model for data pipeline.
 		// Build converter from view to model for data pipeline.
-		BuildViewConverterFor( data.viewToModel )
+		buildViewConverter().for( data.viewToModel )
 			.fromElement( 'em' )
 			.fromElement( 'em' )
 			.fromElement( 'i' )
 			.fromElement( 'i' )
 			.fromAttribute( 'style', { 'font-style': 'italic' } )
 			.fromAttribute( 'style', { 'font-style': 'italic' } )