1234567891011121314151617181920212223242526272829 |
- import { ModuleRoot } from "queenjs";
- import { editActions } from "./actions/edit";
- import { initActions } from "./actions/init";
- import components from "./components";
- import config from "./config";
- import { HistoryCtrl } from "./controllers/HistoryCtrl";
- import { helpers } from "./helpers";
- import { https } from "./https";
- import { store } from "./stores";
- export class EditorModule extends ModuleRoot {
- config = this.setConfig(config);
- components = this.useComponents(components);
- actions = this.createActions([initActions, editActions]);
- https = this.createHttps(https);
- store = this.createStore(store);
- helper = this.createHelper(helpers);
- controls = {
- historyCtrl: new HistoryCtrl(this),
- };
- onReady() {
- this.actions.init();
- }
- }
- export const { useEditor, initEditor } = EditorModule.hook("Editor");
|