upload images and store them as base64

This commit is contained in:
kbariotis 2020-05-13 21:42:56 +01:00
parent ad81033a78
commit 0cb67a0bc9
9 changed files with 103 additions and 5 deletions

View file

@ -31,7 +31,8 @@ export type ExcalidrawGenericElement = _ExcalidrawElementBase & {
export type ExcalidrawElement =
| ExcalidrawGenericElement
| ExcalidrawTextElement
| ExcalidrawLinearElement;
| ExcalidrawLinearElement
| ExcalidrawImageElement;
export type NonDeleted<TElement extends ExcalidrawElement> = TElement & {
isDeleted: false;
@ -55,6 +56,12 @@ export type ExcalidrawLinearElement = _ExcalidrawElementBase &
lastCommittedPoint?: Point | null;
}>;
export type ExcalidrawImageElement = _ExcalidrawElementBase &
Readonly<{
type: "image";
imageData: string;
}>;
export type PointerType = "mouse" | "pen" | "touch";
export type TextAlign = "left" | "center" | "right";