Explorar o código

Aligned to changes in the engine.

Piotrek Koszuliński %!s(int64=5) %!d(string=hai) anos
pai
achega
646ad6c1e1
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      packages/ckeditor5-core/src/editor/editor.js

+ 3 - 3
packages/ckeditor5-core/src/editor/editor.js

@@ -52,8 +52,6 @@ export default class Editor {
 	 * @param {Object} [config={}] The editor configuration.
 	 * @param {Object} [config={}] The editor configuration.
 	 */
 	 */
 	constructor( config = {} ) {
 	constructor( config = {} ) {
-		const stylesProcessor = new StylesProcessor();
-
 		/**
 		/**
 		 * The editor context.
 		 * The editor context.
 		 * When it is not provided through the configuration, the editor creates it.
 		 * When it is not provided through the configuration, the editor creates it.
@@ -164,6 +162,8 @@ export default class Editor {
 		 */
 		 */
 		this.model = new Model();
 		this.model = new Model();
 
 
+		const stylesProcessor = new StylesProcessor();
+
 		/**
 		/**
 		 * The {@link module:engine/controller/datacontroller~DataController data controller}.
 		 * The {@link module:engine/controller/datacontroller~DataController data controller}.
 		 * Used e.g. for setting and retrieving the editor data.
 		 * Used e.g. for setting and retrieving the editor data.
@@ -171,7 +171,7 @@ export default class Editor {
 		 * @readonly
 		 * @readonly
 		 * @member {module:engine/controller/datacontroller~DataController}
 		 * @member {module:engine/controller/datacontroller~DataController}
 		 */
 		 */
-		this.data = new DataController( stylesProcessor, this.model );
+		this.data = new DataController( this.model, stylesProcessor );
 
 
 		/**
 		/**
 		 * The {@link module:engine/controller/editingcontroller~EditingController editing controller}.
 		 * The {@link module:engine/controller/editingcontroller~EditingController editing controller}.