Răsfoiți Sursa

Merge pull request #100 from ckeditor/t/ckeditor5-engine/1028

Internal: Bound view Document#isReadOnly directly to the Editor#isReadOnly omitting EditingController (see ckeditor/ckeditor5-engine#1028).
Piotr Jasiun 8 ani în urmă
părinte
comite
cd858afff9

+ 1 - 1
packages/ckeditor5-core/src/editor/standardeditor.js

@@ -39,7 +39,7 @@ export default class StandardEditor extends Editor {
 
 		// Documented in Editor.
 		this.editing = new EditingController( this.document );
-		this.editing.bind( 'isReadOnly' ).to( this );
+		this.editing.view.bind( 'isReadOnly' ).to( this );
 
 		/**
 		 * Instance of the {@link module:core/editingkeystrokehandler~EditingKeystrokeHandler}.

+ 3 - 3
packages/ckeditor5-core/tests/editor/standardeditor.js

@@ -31,16 +31,16 @@ describe( 'StandardEditor', () => {
 			expect( editor.keystrokes ).to.be.instanceof( EditingKeystrokeHandler );
 		} );
 
-		it( 'should bind editing#isReadOnly to the editor', () => {
+		it( 'should bind editing.view#isReadOnly to the editor', () => {
 			const editor = new StandardEditor( editorElement, { foo: 1 } );
 
 			editor.isReadOnly = false;
 
-			expect( editor.editing.isReadOnly ).to.false;
+			expect( editor.editing.view.isReadOnly ).to.false;
 
 			editor.isReadOnly = true;
 
-			expect( editor.editing.isReadOnly ).to.true;
+			expect( editor.editing.view.isReadOnly ).to.true;
 		} );
 
 		it( 'activates #keystrokes', () => {