Skip to content

Instantly share code, notes, and snippets.

@ljmotta
Last active October 14, 2020 20:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ljmotta/48790a69bc4d567d75293b69f4e2ab2f to your computer and use it in GitHub Desktop.
Save ljmotta/48790a69bc4d567d75293b69f4e2ab2f to your computer and use it in GitHub Desktop.
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