|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
import {Injector} from "@angular/core"; |
|
|
|
|
import {ApplicationRef, Injector} from "@angular/core"; |
|
|
|
|
import {HookService} from "core-app/modules/plugins/hook-service"; |
|
|
|
|
import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; |
|
|
|
|
import {ConfirmDialogService} from "core-components/modals/confirm-dialog/confirm-dialog.service"; |
|
|
|
@ -22,6 +22,7 @@ import {EditorMacrosService} from "core-components/modals/editor/editor-macros.s |
|
|
|
|
import {HTMLSanitizeService} from "../common/html-sanitize/html-sanitize.service"; |
|
|
|
|
import {PathHelperService} from "../common/path-helper/path-helper.service"; |
|
|
|
|
import {CKEditorPreviewService} from "core-components/ckeditor/ckeditor-preview.service"; |
|
|
|
|
import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper"; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Plugin context bridge for plugins outside the CLI compiler context |
|
|
|
@ -53,7 +54,7 @@ export class OpenProjectPluginContext { |
|
|
|
|
macros: this.injector.get<EditorMacrosService>(EditorMacrosService), |
|
|
|
|
htmlSanitizeService: this.injector.get<HTMLSanitizeService>(HTMLSanitizeService), |
|
|
|
|
ckEditorPreview: this.injector.get<CKEditorPreviewService>(CKEditorPreviewService), |
|
|
|
|
pathHelperService: this.injector.get<PathHelperService>(PathHelperService) |
|
|
|
|
pathHelperService: this.injector.get<PathHelperService>(PathHelperService), |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// Random collection of classes needed outside of angular
|
|
|
|
@ -78,4 +79,11 @@ export class OpenProjectPluginContext { |
|
|
|
|
this.hooks[hook] = (callback:Function) => this.services.hooks.register(hook, callback); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public bootstrap(element:HTMLElement) { |
|
|
|
|
DynamicBootstrapper.bootstrapOptionalEmbeddable( |
|
|
|
|
this.injector.get(ApplicationRef), |
|
|
|
|
element |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|