소스 검색

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 년 전
부모
커밋
cd858afff9
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      packages/ckeditor5-core/src/editor/standardeditor.js
  2. 3 3
      packages/ckeditor5-core/tests/editor/standardeditor.js

+ 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', () => {