diff --git a/public/images/canva.png b/public/images/canva.png new file mode 100644 index 000000000..096c351d7 Binary files /dev/null and b/public/images/canva.png differ diff --git a/shared/editor/embeds/Canva.tsx b/shared/editor/embeds/Canva.tsx new file mode 100644 index 000000000..99f187c60 --- /dev/null +++ b/shared/editor/embeds/Canva.tsx @@ -0,0 +1,22 @@ +import * as React from "react"; +import Frame from "../components/Frame"; +import { EmbedProps as Props } from "."; + +function Canva(props: Props) { + const { matches } = props.attrs; + const embedId = matches[1]; + + return ( + + ); +} + +Canva.ENABLED = [ + /^https:\/\/(?:www\.)?canva\.com\/design\/([a-zA-Z0-9]*)\/(.*)$/, +]; + +export default Canva; diff --git a/shared/editor/embeds/index.tsx b/shared/editor/embeds/index.tsx index bf82214da..0b42e5bfc 100644 --- a/shared/editor/embeds/index.tsx +++ b/shared/editor/embeds/index.tsx @@ -9,6 +9,7 @@ import Abstract from "./Abstract"; import Airtable from "./Airtable"; import Berrycast from "./Berrycast"; import Bilibili from "./Bilibili"; +import Canva from "./Canva"; import Cawemo from "./Cawemo"; import ClickUp from "./ClickUp"; import Codepen from "./Codepen"; @@ -150,6 +151,12 @@ const embeds: EmbedDescriptor[] = [ icon: Bilibili, component: Bilibili, }), + new EmbedDescriptor({ + title: "Canva", + keywords: "design", + icon: Canva, + component: Canva, + }), new EmbedDescriptor({ title: "Cawemo", keywords: "bpmn process",