diff --git a/src/commands/index.ts b/src/commands/index.ts index e21fa0a98..f68549efd 100644 --- a/src/commands/index.ts +++ b/src/commands/index.ts @@ -76,7 +76,7 @@ const commandsDef = [ ['component-drag', 'ComponentDrag'], ]; -export default class Commands extends Module { +export default class CommandsModule extends Module { CommandAbstract = CommandAbstract; defaultCommands: Record = {}; commands: Record = {}; @@ -174,10 +174,11 @@ export default class Commands extends Module { get Utils() { return this.em.Utils; } - //@ts-ignore - get Commands(): CommandsModule { - return this.em.get('Commands'); + get Commands() { + return this.em.Commands; } get Keymaps() { return this.em.Keymaps; diff --git a/src/editor/model/Editor.ts b/src/editor/model/Editor.ts index aad58c81f..2125e25b9 100644 --- a/src/editor/model/Editor.ts +++ b/src/editor/model/Editor.ts @@ -31,6 +31,7 @@ import PanelManager from '../../panels'; import CodeManagerModule from '../../code_manager'; import UndoManagerModule from '../../undo_manager'; import RichTextEditorModule from '../../rich_text_editor'; +import CommandsModule from '../../commands'; //@ts-ignore Backbone.$ = $; @@ -130,6 +131,10 @@ export default class EditorModel extends Model { return this.get('Utils'); } + get Commands(): CommandsModule { + return this.get('Commands'); + } + get Keymaps(): KeymapsModule { return this.get('Keymaps'); }