Kaynağa Gözat

Internal: Aligned code with Editor class changes.

Oskar Wróbel 8 yıl önce
ebeveyn
işleme
bf2e267459

+ 0 - 1
packages/ckeditor5-editor-classic/src/classiceditor.js

@@ -52,7 +52,6 @@ export default class ClassicEditor extends StandardEditor {
 	constructor( element, config ) {
 		super( element, config );
 
-		this.model.document.createRoot();
 		this.data.processor = new HtmlDataProcessor();
 		this.ui = new ClassicEditorUI( this, new ClassicEditorUIView( this.locale ) );
 

+ 0 - 4
packages/ckeditor5-editor-classic/src/classiceditorui.js

@@ -52,10 +52,6 @@ export default class ClassicEditorUI {
 		 * @private
 		 */
 		this._toolbarConfig = normalizeToolbarConfig( editor.config.get( 'toolbar' ) );
-
-		// RootEditableElement should be created together with the editor structure.
-		// See https://github.com/ckeditor/ckeditor5/issues/647.
-		editor.editing.createRoot( 'div' );
 	}
 
 	/**

+ 0 - 14
packages/ckeditor5-editor-classic/tests/classiceditor.js

@@ -16,7 +16,6 @@ import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
 
 import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
-import count from '@ckeditor/ckeditor5-utils/src/count';
 
 testUtils.createSinonSandbox();
 
@@ -39,24 +38,11 @@ describe( 'ClassicEditor', () => {
 			editor = new ClassicEditor( editorElement );
 		} );
 
-		it( 'creates a single document root', () => {
-			expect( count( editor.model.document.getRootNames() ) ).to.equal( 1 );
-			expect( editor.model.document.getRoot() ).to.have.property( 'name', '$root' );
-		} );
-
 		it( 'uses HTMLDataProcessor', () => {
 			expect( editor.data.processor ).to.be.instanceof( HtmlDataProcessor );
 		} );
 
 		describe( 'ui', () => {
-			it( 'creates a single div editable root in the view', () => {
-				editor.ui.init();
-
-				expect( editor.editing.view.getRoot() ).to.have.property( 'name', 'div' );
-
-				editor.ui.destroy();
-			} );
-
 			it( 'creates the UI using BoxedEditorUI classes', () => {
 				expect( editor.ui ).to.be.instanceof( ClassicEditorUI );
 				expect( editor.ui.view ).to.be.instanceof( ClassicEditorUIView );

+ 0 - 5
packages/ckeditor5-editor-classic/tests/classiceditorui.js

@@ -7,7 +7,6 @@
 
 import ComponentFactory from '@ckeditor/ckeditor5-ui/src/componentfactory';
 import View from '@ckeditor/ckeditor5-ui/src/view';
-import RootEditableElement from '@ckeditor/ckeditor5-engine/src/view/rooteditableelement';
 
 import VirtualTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/virtualtesteditor';
 import ClassicEditorUI from '../src/classiceditorui';
@@ -57,10 +56,6 @@ describe( 'ClassicEditorUI', () => {
 		it( 'creates #focusTracker', () => {
 			expect( ui.focusTracker ).to.be.instanceOf( FocusTracker );
 		} );
-
-		it( 'creates root editable element', () => {
-			expect( editor.editing.view.getRoot() ).to.be.instanceOf( RootEditableElement );
-		} );
 	} );
 
 	describe( 'init()', () => {