瀏覽代碼

There is no good reason to keep text.data readonly.

Piotr Jasiun 9 年之前
父節點
當前提交
b8379270b0
共有 1 個文件被更改,包括 2 次插入13 次删除
  1. 2 13
      packages/ckeditor5-engine/src/model/text.js

+ 2 - 13
packages/ckeditor5-engine/src/model/text.js

@@ -29,22 +29,11 @@ export default class Text extends Node {
 		super( attrs );
 
 		/**
-		 * Node's text.
+		 * Text data contained in this text node.
 		 *
 		 * @type {String}
-		 * @private
 		 */
-		this._data = data || '';
-	}
-
-	/**
-	 * Text data contained in this text node.
-	 *
-	 * @readonly
-	 * @type {String}
-	 */
-	get data() {
-		return this._data;
+		this.data = data || '';
 	}
 
 	/**