diff --git a/packages/quill/src/themes/base.ts b/packages/quill/src/themes/base.ts index 8d7edf63b8..9b0a9da299 100644 --- a/packages/quill/src/themes/base.ts +++ b/packages/quill/src/themes/base.ts @@ -331,6 +331,9 @@ function extractVideoUrl(url: string) { url.match( /^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/, ) || + url.match( + /^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/shorts\/([a-zA-Z0-9_-]+)/, + ) || url.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/); if (match) { return `${match[1] || 'https'}://www.youtube.com/embed/${