Procházet zdrojové kódy

Removed loadDataFromElement method from ElementApiMixin.

Oskar Wróbel před 7 roky
rodič
revize
134e25f0e9

+ 0 - 14
packages/ckeditor5-core/src/editor/utils/elementapimixin.js

@@ -3,7 +3,6 @@
  * For licensing, see LICENSE.md.
  */
 
-import getDataFromElement from '@ckeditor/ckeditor5-utils/src/dom/getdatafromelement';
 import setDataInElement from '@ckeditor/ckeditor5-utils/src/dom/setdatainelement';
 
 /**
@@ -22,13 +21,6 @@ const ElementApiMixin = {
 	 */
 	updateElement() {
 		setDataInElement( this.element, this.data.get() );
-	},
-
-	/**
-	 * @inheritDoc
-	 */
-	loadDataFromElement() {
-		this.data.set( getDataFromElement( this.element ) );
 	}
 };
 
@@ -52,9 +44,3 @@ export default ElementApiMixin;
  *
  * @method #updateElement
  */
-
-/**
- * Loads the data from the {@link #element editor element} to the main root.
- *
- * @method #loadDataFromElement
- */

+ 0 - 17
packages/ckeditor5-core/tests/editor/utils/elementapimixin.js

@@ -27,23 +27,6 @@ describe( 'ElementApiMixin', () => {
 		editor.destroy();
 	} );
 
-	describe( 'loadDataFromElement()', () => {
-		it( 'should be added to editor interface', () => {
-			expect( editor ).have.property( 'loadDataFromElement' ).to.be.a( 'function' );
-		} );
-
-		it( 'sets data to editor element', () => {
-			const editorElement = document.createElement( 'div' );
-
-			editor.element = editorElement;
-			editorElement.innerHTML = 'foo bar';
-
-			editor.loadDataFromElement();
-
-			expect( editorElement.innerHTML ).to.equal( 'foo bar' );
-		} );
-	} );
-
 	describe( 'updateEditorElement()', () => {
 		it( 'should be added to editor interface', () => {
 			expect( editor ).have.property( 'updateElement' ).to.be.a( 'function' );