diff --git a/public/images/valtown.png b/public/images/valtown.png new file mode 100644 index 000000000..2738bd653 Binary files /dev/null and b/public/images/valtown.png differ diff --git a/shared/editor/embeds/Valtown.tsx b/shared/editor/embeds/Valtown.tsx new file mode 100644 index 000000000..586b84999 --- /dev/null +++ b/shared/editor/embeds/Valtown.tsx @@ -0,0 +1,19 @@ +import * as React from "react"; +import Frame from "../components/Frame"; +import { EmbedProps as Props } from "."; + +export default function Valtown(props: Props) { + const { matches } = props.attrs; + const valId = matches[1]; + + return ( + + ); +} + +Valtown.ENABLED = [/^https?:\/\/(?:www.)?val\.town\/(?:v|embed)\/(.*)$/]; diff --git a/shared/editor/embeds/index.tsx b/shared/editor/embeds/index.tsx index 083c43d1c..5558b8a2b 100644 --- a/shared/editor/embeds/index.tsx +++ b/shared/editor/embeds/index.tsx @@ -47,6 +47,7 @@ import Spotify from "./Spotify"; import Tldraw from "./Tldraw"; import Trello from "./Trello"; import Typeform from "./Typeform"; +import Valtown from "./Valtown"; import Vimeo from "./Vimeo"; import Whimsical from "./Whimsical"; import YouTube from "./YouTube"; @@ -384,6 +385,12 @@ const embeds: EmbedDescriptor[] = [ icon: Typeform, component: Typeform, }), + new EmbedDescriptor({ + title: "Valtown", + keywords: "code", + icon: Valtown, + component: Valtown, + }), new EmbedDescriptor({ title: "Vimeo", keywords: "video",