Skip to content

Instantly share code, notes, and snippets.

@ljmotta
Created October 13, 2020 20:43
Embed
What would you like to do?
Base64Png Chrome Extension
import { init } 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, T>(message: EnvelopeBusMessage<D, T>, targetOrigin?: string, _?: any) {
window.parent.postMessage(message, targetOrigin!, _);
},
},
editorFactory: new Base64PngEditorFactory(),
editorContext: { channel: ChannelType.GITHUB, operatingSystem: getOperatingSystem() },
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment