Преглед на файлове

Other: Simplify model converter.

Maciej Gołaszewski преди 8 години
родител
ревизия
c4063771a3
променени са 1 файла, в които са добавени 1 реда и са изтрити 7 реда
  1. 1 7
      packages/ckeditor5-highlight/src/highlightediting.js

+ 1 - 7
packages/ckeditor5-highlight/src/highlightediting.js

@@ -42,13 +42,7 @@ export default class HighlightEditing extends Plugin {
 		buildModelConverter()
 			.for( data.modelToView, editing.modelToView )
 			.fromAttribute( 'highlight' )
-			.toElement( data => {
-				const attributeElement = new AttributeElement( 'mark' );
-
-				attributeElement.addClass( data );
-
-				return attributeElement;
-			} );
+			.toElement( data => new AttributeElement( 'mark', { class: data } ) );
 
 		const configuredClasses = editor.config.get( 'highlight' ).map( config => config.class );