From 325580689124048772039e1a8e9b5a240cbb062c Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Fri, 26 Aug 2022 12:41:39 -0700 Subject: [PATCH] Support Figma embeds --- web/components/editor/embed-modal.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/components/editor/embed-modal.tsx b/web/components/editor/embed-modal.tsx index 6acfd8f0..48ccbfbb 100644 --- a/web/components/editor/embed-modal.tsx +++ b/web/components/editor/embed-modal.tsx @@ -40,6 +40,11 @@ const embedPatterns: EmbedPattern[] = [ rewrite: (id) => ``, }, + { + regex: /^(https?:\/\/www\.figma\.com\/(?:file|proto)\/[^\/]+\/[^\/]+)/, + rewrite: (url) => + ``, + }, // Twitch is a bit annoying, since it requires the `&parent=DOMAIN` to match { // Twitch: https://www.twitch.tv/videos/1445087149