feat: Additional embed integrations (#3398)

* feat: Gliffy integration

* feat: JSFiddle integration

* feat: Otter.ai integration

* Optimised images with calibre/image-actions

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Tom Moor
2022-04-16 15:04:49 -07:00
committed by GitHub
parent 4c4b80ba9b
commit 0883a56311
9 changed files with 86 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import * as React from "react";
import { useTheme } from "styled-components";
import Frame from "../components/Frame";
import { EmbedProps as Props } from ".";
function JSFiddle(props: Props) {
const normalizedUrl = props.attrs.href.replace(/(\/embedded)?\/$/, "");
const theme = useTheme();
return (
<Frame
{...props}
src={`${normalizedUrl}/embedded/result,js,css,html/${
theme.isDark ? "dark/" : ""
}`}
title="JSFiddle Embed"
referrerPolicy="origin"
border
/>
);
}
JSFiddle.ENABLED = [new RegExp("https?://jsfiddle.net/(.*)/(.*)$")];
export default JSFiddle;