|
@@ -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' } )
|