|
|
@@ -9,8 +9,9 @@ import InlineEditorUI from '../src/inlineeditorui';
|
|
|
import InlineEditorUIView from '../src/inlineeditoruiview';
|
|
|
|
|
|
import HtmlDataProcessor from '@ckeditor/ckeditor5-engine/src/dataprocessor/htmldataprocessor';
|
|
|
-import buildViewConverter from '@ckeditor/ckeditor5-engine/src/conversion/buildviewconverter';
|
|
|
-import buildModelConverter from '@ckeditor/ckeditor5-engine/src/conversion/buildmodelconverter';
|
|
|
+
|
|
|
+import { downcastElementToElement } from '@ckeditor/ckeditor5-engine/src/conversion/downcast-converters';
|
|
|
+import { upcastElementToElement } from '@ckeditor/ckeditor5-engine/src/conversion/upcast-converters';
|
|
|
|
|
|
import InlineEditor from '../src/inlineeditor';
|
|
|
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
|
|
@@ -245,17 +246,12 @@ describe( 'InlineEditor', () => {
|
|
|
schema.extend( 'heading', { allowIn: '$root' } );
|
|
|
schema.extend( '$text', { allowIn: 'heading' } );
|
|
|
|
|
|
- buildModelConverter().for( editor.data.modelToView )
|
|
|
- .fromElement( 'heading' )
|
|
|
- .toElement( 'heading' );
|
|
|
-
|
|
|
- buildViewConverter().for( editor.data.viewToModel )
|
|
|
- .fromElement( 'heading' )
|
|
|
- .toElement( 'heading' );
|
|
|
-
|
|
|
- buildModelConverter().for( editor.editing.modelToView )
|
|
|
- .fromElement( 'heading' )
|
|
|
- .toElement( 'heading-editing-representation' );
|
|
|
+ editor.conversion.for( 'upcast' ).add( upcastElementToElement( { model: 'heading', view: 'heading' } ) );
|
|
|
+ editor.conversion.for( 'dataDowncast' ).add( downcastElementToElement( { model: 'heading', view: 'heading' } ) );
|
|
|
+ editor.conversion.for( 'editingDowncast' ).add( downcastElementToElement( {
|
|
|
+ model: 'heading',
|
|
|
+ view: 'heading-editing-representation'
|
|
|
+ } ) );
|
|
|
} );
|
|
|
} );
|
|
|
|