Add tldraw embed (#3439)
* Test Tldraw embed * Correct regex * Correct alt for image * Resize image to 120x120
This commit is contained in:
BIN
public/images/tldraw.png
Normal file
BIN
public/images/tldraw.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
19
shared/editor/embeds/Tldraw.tsx
Normal file
19
shared/editor/embeds/Tldraw.tsx
Normal 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;
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user