Created
October 14, 2020 20:26
-
-
Save ljmotta/265d80547d5029e8af3107d7b3619a5d to your computer and use it in GitHub Desktop.
Base64PngEditor Envelope Init
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 { 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 { ChannelType, getOperatingSystem } from "@kogito-tooling/channel-common-api"; | |
import { Base64PngEditorFactory } from "base64png-editor"; | |
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 Base64PngEditorFactory()]), | |
editorContext: { channel: ChannelType.EMBEDDED, operatingSystem: getOperatingSystem() } | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment