mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-27 23:15:15 +08:00
refactor(extension-youtube): rename utility function name (#3498)
This commit is contained in:
parent
e9d9d88511
commit
8b854b67a4
@ -30,7 +30,7 @@ export const getYoutubeEmbedUrl = (nocookie?: boolean) => {
|
||||
return nocookie ? 'https://www.youtube-nocookie.com/embed/' : 'https://www.youtube.com/embed/'
|
||||
}
|
||||
|
||||
export const getEmbedURLFromYoutubeURL = (options: GetEmbedUrlOptions) => {
|
||||
export const getEmbedUrlFromYoutubeUrl = (options: GetEmbedUrlOptions) => {
|
||||
const {
|
||||
url,
|
||||
allowFullscreen,
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { mergeAttributes, Node, nodePasteRule } from '@tiptap/core'
|
||||
|
||||
import { getEmbedURLFromYoutubeURL, isValidYoutubeUrl, YOUTUBE_REGEX_GLOBAL } from './utils'
|
||||
import { getEmbedUrlFromYoutubeUrl, isValidYoutubeUrl, YOUTUBE_REGEX_GLOBAL } from './utils'
|
||||
|
||||
export interface YoutubeOptions {
|
||||
addPasteHandler: boolean;
|
||||
@ -133,7 +133,7 @@ export const Youtube = Node.create<YoutubeOptions>({
|
||||
},
|
||||
|
||||
renderHTML({ HTMLAttributes }) {
|
||||
const embedUrl = getEmbedURLFromYoutubeURL({
|
||||
const embedUrl = getEmbedUrlFromYoutubeUrl({
|
||||
url: HTMLAttributes.src,
|
||||
allowFullscreen: this.options.allowFullscreen,
|
||||
autoplay: this.options.autoplay,
|
||||
|
Loading…
Reference in New Issue
Block a user