Hello Takuya,
Refer to this embed plugin , and this PR , that’d be good if considering to extend this plugin on a vimeo . I truly understand what you’ve raised the limitation of external contents for printing/exporting and searching.
Best regards,
Bundit
craftzdog
(Takuya Matsuyama)
March 8, 2023, 6:04am
2
Hi Bundit,
Yeah that is nice to have.
Created an issue on the repo:
opened 06:01AM - 08 Mar 23 UTC
https://forum.inkdrop.app/t/embed-a-vimeo-external-content-to-note/3820
I guess it can be easily supported just like YouTube:
import * as React from 'react'
import { useRef, useState } from 'react'
const BASE_URL = 'https://www.youtube.com/'
const EMBED_PROVIDER_URL = 'https://www.youtube.com/embed/'
export function test(url) {
return url.startsWith(BASE_URL)
}
export default function YouTube(props) {
const { href } = props
const contentFrame = useRef()
const [frameId] = useState('youtube-' + Math.random())
const query = new URLSearchParams(href.split('?')[1])
const videoId = query.get('v')
const url = `${EMBED_PROVIDER_URL}${videoId}`
return (
<iframe
id={frameId}
This file has been truncated. show original
Feel free to send me a pull request if you have time
craftzdog
(Takuya Matsuyama)
March 20, 2023, 12:35am
4