Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
GwtEditorWrapperFactory
import { ChannelType, getOperatingSystem } from "@kogito-tooling/channel-common-api";
import { init } from "@kogito-tooling/editor/dist/envelope";
import { CompositeEditorFactory } from "@kogito-tooling/editor/dist/envelope";
import { EnvelopeBusMessage } from "@kogito-tooling/envelope-bus/dist/api";
import { GwtEditorWrapperFactory } from "@kogito-tooling/kie-bc-editors";
init({
container: document.getElementById("envelope-app")!,
bus: {
postMessage<D, Type>(message: EnvelopeBusMessage<D, Type>, targetOrigin?: string, _?: any) {
window.parent.postMessage(message, "*", _);
}
},
editorFactory: new CompositeEditorFactory([new GwtEditorWrapperFactory()]),
editorContext: { channel: ChannelType.EMBEDDED, operatingSystem: getOperatingSystem() }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment