Skip to content

Instantly share code, notes, and snippets.

@ljmotta
Last active October 13, 2020 19:01
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/dc6f931e5063361a5621284ec9a2c2db to your computer and use it in GitHub Desktop.
Save ljmotta/dc6f931e5063361a5621284ec9a2c2db to your computer and use it in GitHub Desktop.
Base64Png Editor Factory
import { EditorFactory, EditorInitArgs, KogitoEditorEnvelopeContextType } from "@kogito-tooling/editor/dist/api";
import { Base64PngEditorInterface } from "./Base64PngEditorInterface";
export class Base64PngEditorFactory implements EditorFactory {
public supports(fileExtension: string) {
return fileExtension === "base64png";
}
public createEditor(envelopeContext: KogitoEditorEnvelopeContextType, initArgs: EditorInitArgs) {
return Promise.resolve(new Base64PngEditorInterface(envelopeContext, initArgs));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment