8
0
Pārlūkot izejas kodu

Merge branch t/ckeditor5-engine/1556

Internal: Align code to the latest changes in conversion helpers API, introduced in engine t/1556.
Piotr Jasiun 7 gadi atpakaļ
vecāks
revīzija
4ea73ab217
1 mainītis faili ar 2 papildinājumiem un 3 dzēšanām
  1. 2 3
      packages/ckeditor5-heading/src/headingediting.js

+ 2 - 3
packages/ckeditor5-heading/src/headingediting.js

@@ -12,7 +12,6 @@ import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 import HeadingCommand from './headingcommand';
 
 import priorities from '@ckeditor/ckeditor5-utils/src/priorities';
-import { upcastElementToElement } from '@ckeditor/ckeditor5-engine/src/conversion/upcast-converters';
 
 const defaultModelElement = 'paragraph';
 
@@ -105,12 +104,12 @@ export default class HeadingEditing extends Plugin {
 	 * @param {module:core/editor/editor~Editor} editor Editor instance on which to add the `h1` conversion.
 	 */
 	_addDefaultH1Conversion( editor ) {
-		editor.conversion.for( 'upcast' ).add( upcastElementToElement( {
+		editor.conversion.for( 'upcast' ).elementToElement( {
 			model: 'heading1',
 			view: 'h1',
 			// With a `low` priority, `paragraph` plugin autoparagraphing mechanism is executed. Make sure
 			// this listener is called before it. If not, `h1` will be transformed into a paragraph.
 			converterPriority: priorities.get( 'low' ) + 1
-		} ) );
+		} );
 	}
 }