|
|
@@ -20,6 +20,7 @@ import EditingKeystrokeHandler from '../editingkeystrokehandler';
|
|
|
import ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';
|
|
|
import mix from '@ckeditor/ckeditor5-utils/src/mix';
|
|
|
import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
|
|
|
+import { StylesProcessor } from '@ckeditor/ckeditor5-engine/src/view/stylesmap';
|
|
|
|
|
|
/**
|
|
|
* The class representing a basic, generic editor.
|
|
|
@@ -161,6 +162,8 @@ export default class Editor {
|
|
|
*/
|
|
|
this.model = new Model();
|
|
|
|
|
|
+ const stylesProcessor = new StylesProcessor();
|
|
|
+
|
|
|
/**
|
|
|
* The {@link module:engine/controller/datacontroller~DataController data controller}.
|
|
|
* Used e.g. for setting and retrieving the editor data.
|
|
|
@@ -168,7 +171,7 @@ export default class Editor {
|
|
|
* @readonly
|
|
|
* @member {module:engine/controller/datacontroller~DataController}
|
|
|
*/
|
|
|
- this.data = new DataController( this.model );
|
|
|
+ this.data = new DataController( this.model, stylesProcessor );
|
|
|
|
|
|
/**
|
|
|
* The {@link module:engine/controller/editingcontroller~EditingController editing controller}.
|
|
|
@@ -177,7 +180,7 @@ export default class Editor {
|
|
|
* @readonly
|
|
|
* @member {module:engine/controller/editingcontroller~EditingController}
|
|
|
*/
|
|
|
- this.editing = new EditingController( this.model );
|
|
|
+ this.editing = new EditingController( this.model, stylesProcessor );
|
|
|
this.editing.view.document.bind( 'isReadOnly' ).to( this );
|
|
|
|
|
|
/**
|