diff --git a/public/images/dbdiagram.png b/public/images/dbdiagram.png new file mode 100644 index 000000000..2dd42f308 Binary files /dev/null and b/public/images/dbdiagram.png differ diff --git a/shared/editor/embeds/DBDiagram.tsx b/shared/editor/embeds/DBDiagram.tsx new file mode 100644 index 000000000..ed1832961 --- /dev/null +++ b/shared/editor/embeds/DBDiagram.tsx @@ -0,0 +1,22 @@ +import * as React from "react"; +import Frame from "./components/Frame"; +import { EmbedProps as Props } from "."; + +export default class DBDiagram extends React.Component { + static ENABLED = [new RegExp("https://dbdiagram.io/(embed|d)/(\\w+)$")]; + + render() { + const { matches } = this.props.attrs; + const shareId = matches[2]; + + return ( + + ); + } +} diff --git a/shared/editor/embeds/index.tsx b/shared/editor/embeds/index.tsx index 38045dccb..59cf7423f 100644 --- a/shared/editor/embeds/index.tsx +++ b/shared/editor/embeds/index.tsx @@ -7,6 +7,7 @@ import Bilibili from "./Bilibili"; import Cawemo from "./Cawemo"; import ClickUp from "./ClickUp"; import Codepen from "./Codepen"; +import DBDiagram from "./DBDiagram"; import Descript from "./Descript"; import Diagrams from "./Diagrams"; import Figma from "./Figma"; @@ -115,6 +116,13 @@ const embeds: EmbedDescriptor[] = [ component: Codepen, matcher: matcher(Codepen), }, + { + title: "DBDiagram", + keywords: "diagrams database", + icon: () => DBDiagram, + component: DBDiagram, + matcher: matcher(DBDiagram), + }, { title: "Descript", keywords: "audio",