Skip to content

Instantly share code, notes, and snippets.

@ljmotta
Created October 14, 2020 20:41
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/ce2eb021dc2d8ad804c6ab156bc285dd to your computer and use it in GitHub Desktop.
Save ljmotta/ce2eb021dc2d8ad804c6ab156bc285dd to your computer and use it in GitHub Desktop.
Base64PngPage Envelope Locator
import { EditorEnvelopeLocator } from "@kogito-tooling/editor/dist/api";
export function Base64PngPage() {
// ...
const editorEnvelopeLocator: EditorEnvelopeLocator = useMemo(() => {
return {
targetOrigin: window.location.origin,
mapping: new Map([
[
"base64png",
{
resourcesPathPrefix: `envelope/`,
envelopePath: `envelope/base64-editor.html`,
},
],
]),
};
}, []);
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment