Przeglądaj źródła

Aligned to changes in Engine (removed writer.setTextData() method).

Kamil Piechaczek 7 lat temu
rodzic
commit
16b1980b4f
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      packages/ckeditor5-list/src/converters.js

+ 2 - 2
packages/ckeditor5-list/src/converters.js

@@ -453,12 +453,12 @@ export function cleanListItem( evt, data, conversionApi ) {
 			if ( child.is( 'text' ) ) {
 				// If this is the first node and it's a text node, left-trim it.
 				if ( firstNode ) {
-					conversionApi.writer.setTextData( child.data.replace( /^\s+/, '' ), child );
+					child._data = child.data.replace( /^\s+/, '' );
 				}
 
 				// If this is the last text node before <ul> or <ol>, right-trim it.
 				if ( !child.nextSibling || ( child.nextSibling.is( 'ul' ) || child.nextSibling.is( 'ol' ) ) ) {
-					conversionApi.writer.setTextData( child.data.replace( /\s+$/, '' ), child );
+					child._data = child.data.replace( /\s+$/, '' );
 				}
 			} else if ( child.is( 'ul' ) || child.is( 'ol' ) ) {
 				// If this is a <ul> or <ol>, do not process it, just mark that we already visited list element.