8
0
Просмотр исходного кода

Merge branch 'master' into t/30

Piotrek Koszuliński 9 лет назад
Родитель
Сommit
3d391aac8b

+ 2 - 2
packages/ckeditor5-core/package.json

@@ -1,13 +1,13 @@
 {
   "name": "ckeditor5-core",
-  "version": "0.1.0",
+  "version": "0.2.0",
   "description": "",
   "keywords": [],
   "dependencies": {},
   "devDependencies": {
     "@ckeditor/ckeditor5-dev-lint": "^1.0.1",
     "gulp": "^3.9.0",
-    "guppy-pre-commit": "^0.3.0"
+    "guppy-pre-commit": "^0.4.0"
   },
   "engines": {
     "node": ">=6.0.0",

+ 8 - 0
packages/ckeditor5-core/src/editor/editor.js

@@ -9,6 +9,7 @@ import PluginCollection from '../plugincollection.js';
 import Locale from '../../utils/locale.js';
 import DataController from '../../engine/datacontroller.js';
 import Document from '../../engine/model/document.js';
+import FocusTracker from '../../utils/focustracker.js';
 
 import CKEditorError from '../../utils/ckeditorerror.js';
 import isArray from '../../utils/lib/lodash/isArray.js';
@@ -83,6 +84,13 @@ export default class Editor {
 		 */
 		this.data = new DataController( this.document );
 
+		/**
+		 * Keeps information about editor focus.
+		 *
+		 * @member {utils.FocusTracker} core.editor.Editor#focusTracker
+		 */
+		this.focusTracker = new FocusTracker();
+
 		/**
 		 * Instance of the {@link engine.EditingController editing controller}.
 		 *

+ 2 - 0
packages/ckeditor5-core/tests/editor/editor.js

@@ -11,6 +11,7 @@ import Editor from '/ckeditor5/core/editor/editor.js';
 import Plugin from '/ckeditor5/core/plugin.js';
 import Config from '/ckeditor5/utils/config.js';
 import PluginCollection from '/ckeditor5/core/plugincollection.js';
+import FocusTracker from '/ckeditor5/utils/focustracker.js';
 
 const pluginClasses = {};
 
@@ -28,6 +29,7 @@ describe( 'Editor', () => {
 
 			expect( editor.config ).to.be.an.instanceof( Config );
 			expect( editor.commands ).to.be.an.instanceof( Map );
+			expect( editor.focusTracker ).to.instanceOf( FocusTracker );
 
 			expect( editor.plugins ).to.be.an.instanceof( PluginCollection );
 			expect( getPlugins( editor ) ).to.be.empty;