pomdtr-excalidraw.web.val.run
Readme

Excalidraw, embedded inside Val Town !

The drawing will be persisted in your blobs as json / png / svg.

You can access the drawing source directly using the /json, /png and /svg subpaths. For example, to embed the image in a markdown document, you can use:

![pomdtr-excalidraw.web.val.run](https://pomdtr-excalidraw.web.val.run/png)

pomdtr-excalidraw.web.val.run

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo?v=29";
import { blob } from "https://esm.town/v/std/blob?v=12";
import { createExcalidraw } from "https://jsr.io/@smallweb/excalidraw/0.3.0/mod.ts";
import { join } from "jsr:@std/path@0.225.2";
const { name } = extractValInfo(import.meta.url);
export default createExcalidraw({
store: {
get: async (key) => {
try {
const res = await blob.get(join(name, key));
return new Uint8Array(await res.arrayBuffer());
} catch (e) {
return null;
}
},
set: (key, value) => {
return blob.set(join(name, key), value);
},
}
});
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
June 27, 2024