This commit is contained in:
@@ -38,20 +38,12 @@ export const StyledMarkdown = ({ html }: { html: string }) => {
|
|||||||
url.origin.includes("youtube.com") &&
|
url.origin.includes("youtube.com") &&
|
||||||
props.node.position.start.column === 1
|
props.node.position.start.column === 1
|
||||||
){
|
){
|
||||||
return (
|
return (
|
||||||
<div>
|
<YouTube videoId={url.searchParams.get("v") || "dQw4w9WgXcQ"} />
|
||||||
<iframe
|
|
||||||
src={'https://www.youtube.com/embed/' + url.searchParams.get("v") }
|
|
||||||
width="100%"
|
|
||||||
height="100%"
|
|
||||||
allowFullScreen
|
|
||||||
>
|
|
||||||
</iframe>
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
//console.log(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return <a {...props} />;
|
return <a {...props} />;
|
||||||
|
|||||||
Reference in New Issue
Block a user