Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #83 from ckeditor/t/82
Browse files Browse the repository at this point in the history
Feature: Added support for mobile YouTube URLs in the default providers configuration. Closes #82.
  • Loading branch information
oleq authored Mar 18, 2019
2 parents 2465aeb + f9a5e89 commit 9e5cf21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mediaembedediting.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ export default class MediaEmbedEditing extends Plugin {
{
name: 'youtube',
url: [
/^youtube\.com\/watch\?v=([\w-]+)/,
/^youtube\.com\/v\/([\w-]+)/,
/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)/,
/^(?:m\.)?youtube\.com\/v\/([\w-]+)/,
/^youtube\.com\/embed\/([\w-]+)/,
/^youtu\.be\/([\w-]+)/
],
Expand Down
4 changes: 4 additions & 0 deletions tests/mediaembedediting.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,14 @@ describe( 'MediaEmbedEditing', () => {
'https://www.youtube.com/watch?v=foo',
'www.youtube.com/watch?v=foo',
'youtube.com/watch?v=foo',
'https://m.youtube.com/watch?v=foo',
'm.youtube.com/watch?v=foo',

'https://www.youtube.com/v/foo',
'www.youtube.com/v/foo',
'youtube.com/v/foo',
'https://m.youtube.com/v/foo',
'm.youtube.com/v/foo',

'https://www.youtube.com/embed/foo',
'www.youtube.com/embed/foo',
Expand Down

0 comments on commit 9e5cf21

Please sign in to comment.