Add tldraw embed (#3439)

* Test Tldraw embed

* Correct regex

* Correct alt for image

* Resize image to 120x120
This commit is contained in:
Limezy
2022-04-24 00:10:33 +07:00
committed by GitHub
parent 33ce49cc33
commit 3b62c76207
3 changed files with 27 additions and 0 deletions

BIN
public/images/tldraw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -0,0 +1,19 @@
import * as React from "react";
import Frame from "../components/Frame";
import { EmbedProps as Props } from ".";
function Tldraw(props: Props) {
return (
<Frame
{...props}
src={props.attrs.href}
title="Tldraw.com Embed"
referrerPolicy="origin"
border
/>
);
}
Tldraw.ENABLED = [new RegExp("https?://www.tldraw.com/r/(.*)$")];
export default Tldraw;

View File

@@ -35,6 +35,7 @@ import Otter from "./Otter";
import Pitch from "./Pitch";
import Prezi from "./Prezi";
import Spotify from "./Spotify";
import Tldraw from "./Tldraw";
import Trello from "./Trello";
import Typeform from "./Typeform";
import Vimeo from "./Vimeo";
@@ -317,6 +318,13 @@ const embeds: EmbedDescriptor[] = [
component: Spotify,
matcher: matcher(Spotify),
},
{
title: "Tldraw",
keywords: "draw schematics diagrams",
icon: () => <Img src="/images/tldraw.png" alt="Tldraw" />,
component: Tldraw,
matcher: matcher(Tldraw),
},
{
title: "Trello",
keywords: "kanban",