ソースを参照

Removed the "model.Writer#setTextData()" method.

Kamil Piechaczek 7 年 前
コミット
f40c73eb3c

+ 0 - 10
packages/ckeditor5-engine/src/model/writer.js

@@ -325,16 +325,6 @@ export default class Writer {
 	}
 
 	/**
-	 * Sets the text content for the specified `textNode`.
-	 *
-	 * @param {String} value New value.
-	 * @param {module:engine/model/text~Text} textNode Text node that will be updated.
-	 */
-	setTextData( value, textNode ) {
-		textNode._data = value;
-	}
-
-	/**
 	 * Sets value of the attribute with given key on a {@link module:engine/model/item~Item model item}
 	 * or on a {@link module:engine/model/range~Range range}.
 	 *

+ 0 - 16
packages/ckeditor5-engine/tests/model/writer.js

@@ -811,16 +811,6 @@ describe( 'Writer', () => {
 		} );
 	} );
 
-	describe( 'setTextData()', () => {
-		it( 'should update the content for text node', () => {
-			const textNode = createText( 'foo' );
-
-			setTextData( 'bar', textNode );
-
-			expect( textNode.data ).to.equal( 'bar' );
-		} );
-	} );
-
 	describe( 'setAttribute() / removeAttribute()', () => {
 		let root, spy;
 
@@ -2472,12 +2462,6 @@ describe( 'Writer', () => {
 		} );
 	}
 
-	function setTextData( value, textNode ) {
-		model.enqueueChange( batch, writer => {
-			writer.setTextData( value, textNode );
-		} );
-	}
-
 	function setAttribute( key, value, itemOrRange ) {
 		model.enqueueChange( batch, writer => {
 			writer.setAttribute( key, value, itemOrRange );