update config to use displayData

This commit is contained in:
ad1992
2022-04-27 14:03:42 +05:30
parent 1edde7291c
commit 128b7741c1
4 changed files with 62 additions and 53 deletions

View File

@@ -228,7 +228,12 @@ export type CustomElementConfig = {
type: "custom";
customType: string;
transformHandles?: boolean;
svg: string | ((element?: ExcalidrawElement) => string | Promise<string>);
displayData: {
type: "svg" | "dataURL";
content:
| string
| ((element?: ExcalidrawElement) => string | Promise<string>);
};
width?: number;
height?: number;
stackedOnTop: boolean;