Browse Source

Update Editor

pull/4849/head
Artur Arseniev 4 years ago
parent
commit
8a168e052e
  1. 10
      src/editor/index.ts
  2. 5
      src/editor/model/Editor.ts

10
src/editor/index.ts

@ -181,13 +181,11 @@ export default class EditorModule implements IBaseModule<EditorConfig> {
get SelectorManager() { get SelectorManager() {
return this.em.Selectors; return this.em.Selectors;
} }
//@ts-ignore get Styles() {
get Styles(): StyleManagerModule { return this.em.Styles;
return this.em.get('StyleManager');
} }
//@ts-ignore get StyleManager() {
get StyleManager(): StyleManagerModule { return this.em.Styles;
return this.em.get('StyleManager');
} }
get Devices() { get Devices() {
return this.em.Devices; return this.em.Devices;

5
src/editor/model/Editor.ts

@ -32,6 +32,7 @@ import CodeManagerModule from '../../code_manager';
import UndoManagerModule from '../../undo_manager'; import UndoManagerModule from '../../undo_manager';
import RichTextEditorModule from '../../rich_text_editor'; import RichTextEditorModule from '../../rich_text_editor';
import CommandsModule from '../../commands'; import CommandsModule from '../../commands';
import StyleManager from '../../style_manager';
//@ts-ignore //@ts-ignore
Backbone.$ = $; Backbone.$ = $;
@ -211,6 +212,10 @@ export default class EditorModel extends Model {
return this.get('PageManager'); return this.get('PageManager');
} }
get Styles(): StyleManager {
return this.get('StyleManager');
}
constructor(conf: EditorConfig = {}) { constructor(conf: EditorConfig = {}) {
super(); super();
this._config = conf; this._config = conf;

Loading…
Cancel
Save