8
0
Kamil Piechaczek 6 лет назад
Родитель
Сommit
367d225d45
1 измененных файлов с 1 добавлено и 8 удалено
  1. 1 8
      packages/ckeditor5-horizontal-line/src/horizontalruleediting.js

+ 1 - 8
packages/ckeditor5-horizontal-line/src/horizontalruleediting.js

@@ -27,7 +27,6 @@ export default class HorizontalRuleEditing extends Plugin {
 		const conversion = editor.conversion;
 
 		schema.register( 'horizontalRule', {
-			isBlock: true,
 			isObject: true,
 			allowWhere: '$block'
 		} );
@@ -52,13 +51,7 @@ export default class HorizontalRuleEditing extends Plugin {
 			}
 		} );
 
-		conversion.for( 'upcast' )
-			.elementToElement( {
-				view: 'hr',
-				model: ( viewElement, modelWriter ) => {
-					return modelWriter.createElement( 'horizontalRule' );
-				}
-			} );
+		conversion.for( 'upcast' ).elementToElement( { view: 'hr', model: 'horizontalRule' } );
 
 		editor.commands.add( 'horizontalRule', new HorizontalRuleCommand( editor ) );
 	}