fix: Enable embeds within HTML and PDF exports (#6290)
This commit is contained in:
@@ -3,13 +3,8 @@ import Frame from "../components/Frame";
|
||||
import ImageZoom from "../components/ImageZoom";
|
||||
import { EmbedProps as Props } from ".";
|
||||
|
||||
const IFRAME_REGEX =
|
||||
/^https:\/\/(invis\.io\/.*)|(projects\.invisionapp\.com\/share\/.*)$/;
|
||||
const IMAGE_REGEX =
|
||||
/^https:\/\/(opal\.invisionapp\.com\/static-signed\/live-embed\/.*)$/;
|
||||
|
||||
function InVision(props: Props) {
|
||||
if (IMAGE_REGEX.test(props.attrs.href)) {
|
||||
function InVision({ matches, ...props }: Props) {
|
||||
if (/opal\.invisionapp\.com/.test(props.attrs.href)) {
|
||||
return (
|
||||
<div className={props.isSelected ? "ProseMirror-selectednode" : ""}>
|
||||
<ImageZoom zoomMargin={24}>
|
||||
@@ -29,6 +24,4 @@ function InVision(props: Props) {
|
||||
return <Frame {...props} src={props.attrs.href} title="InVision Embed" />;
|
||||
}
|
||||
|
||||
InVision.ENABLED = [IFRAME_REGEX, IMAGE_REGEX];
|
||||
|
||||
export default InVision;
|
||||
|
||||
Reference in New Issue
Block a user