Last active
October 14, 2020 20:35
-
-
Save ljmotta/48790a69bc4d567d75293b69f4e2ab2f to your computer and use it in GitHub Desktop.
GwtEditorWrapperFactory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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