From 2f53387880d547494f275dcea783566c087acbe3 Mon Sep 17 00:00:00 2001 From: saiury92 Date: Wed, 10 Jul 2019 08:03:59 +0700 Subject: [PATCH] Allow google drive iframe with editor input (redactor) --- vendor/assets/javascripts/redactor-rails/plugins/video.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vendor/assets/javascripts/redactor-rails/plugins/video.js b/vendor/assets/javascripts/redactor-rails/plugins/video.js index dafbf5b..de4ddf8 100755 --- a/vendor/assets/javascripts/redactor-rails/plugins/video.js +++ b/vendor/assets/javascripts/redactor-rails/plugins/video.js @@ -3,6 +3,8 @@ return { reUrlYoutube: /https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/ig, reUrlVimeo: /https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/, + reUrlGoogleDrive: /^(https?:\/\/(www\.)?drive.google.com\/)file\/d\/([^\/]+)((\/.*)|(\/([a-zA-z])))*$/, + getTemplate: function() { return String() + '
' + '' + '' + '
'; }, @@ -31,7 +33,7 @@ if (!data.match(/