Explorar el Código

Merge branch t/engine/1186

Internal: Update API usage after merge t/1186 on engine.
Piotr Jasiun hace 8 años
padre
commit
d3d2429482

+ 1 - 1
packages/ckeditor5-editor-balloon/src/ballooneditor.js

@@ -56,7 +56,7 @@ export default class BalloonEditor extends StandardEditor {
 		this.config.get( 'plugins' ).push( ContextualToolbar );
 		this.config.define( 'contextualToolbar', this.config.get( 'toolbar' ) );
 
-		this.document.createRoot();
+		this.model.document.createRoot();
 		this.data.processor = new HtmlDataProcessor();
 		this.ui = new BalloonEditorUI( this, new BalloonEditorUIView( this.locale, element ) );
 	}

+ 3 - 3
packages/ckeditor5-editor-balloon/tests/ballooneditor.js

@@ -54,8 +54,8 @@ describe( 'BalloonEditor', () => {
 		} );
 
 		it( 'creates a single document root', () => {
-			expect( count( editor.document.getRootNames() ) ).to.equal( 1 );
-			expect( editor.document.getRoot() ).to.have.property( 'name', '$root' );
+			expect( count( editor.model.document.getRootNames() ) ).to.equal( 1 );
+			expect( editor.model.document.getRoot() ).to.have.property( 'name', '$root' );
 		} );
 
 		it( 'uses HTMLDataProcessor', () => {
@@ -215,7 +215,7 @@ describe( 'BalloonEditor', () => {
 				.then( newEditor => {
 					editor = newEditor;
 
-					const schema = editor.document.schema;
+					const schema = editor.model.schema;
 
 					schema.registerItem( 'heading' );
 					schema.allow( { name: 'heading', inside: '$root' } );