diff src/test/tiny.html @ 27:6871eec2cf4c

add rumble
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 21 Jul 2022 00:01:46 -0600
parents 0837820b97fb
children d9d7aa2a79db
line wrap: on
line diff
--- a/src/test/tiny.html	Wed Jul 20 15:47:18 2022 -0600
+++ b/src/test/tiny.html	Thu Jul 21 00:01:46 2022 -0600
@@ -9,6 +9,7 @@
 			var youtubePtn1 = new RegExp('https://youtu.be/([a-zA-Z0-9_-]+)(?:\\?t=([0-9]+))?');
 			var youtubePtn2 = new RegExp('https://www.youtube.com/watch\\?v=([a-zA-Z0-9_-]+)(?:\\?t=([0-9]+)s)?');
 			var bitchutePtn = new RegExp('https://www.bitchute.com/video/([a-zA-Z0-9]+)/');
+			var rumblePtn = new RegExp('https://rumble.com/embed/[a-z0-9]+/\\?pub=[a-z0-9]+');
 			var url2;
 
 			function media_url_resolver(data,resolve,reject) {
@@ -23,6 +24,8 @@
 					html += '" frameborder="0" allowfullscreen></iframe>';
 				} else if( result = url.match(bitchutePtn) ) {
 					html = '<iframe data-video="'+url+'" width="560" height="315" scrolling="no" frameborder="0" style="border: none;" src="https://www.bitchute.com/embed/' + result[1] + '/"></iframe>';
+				} else if( url.match(rumblePtn) ) {
+					html = '<iframe data-video="'+url+'" width="560" height="315" frameborder="0" allowfullscreen src="' + url + '"></iframe>';
 				} else {
 					html = '<a data-video="'+url+'" href="'+url+'">'+url+'</a>';
 				}
@@ -37,7 +40,6 @@
 					tooltip: 'Code',
 					onAction: function(api) {
 						editor.execCommand('mceToggleFormat', false, 'code')
-						//api.setActive( !api.isActive() );
 					},
 					onSetup: function(api) {
 						api.setActive(editor.formatter.match('code'));
@@ -58,16 +60,14 @@
 				});
 
 				editor.on( 'init', function(e) {editor.focus()} );
-				//editor.focus();
 			}
 
 			tinymce.init({
 				selector: 'textarea',
 				setup: tinymceSetup,
-				menubar: false,
+				//menubar: false,
 				statusbar: false,
 				toolbar: 'link image media | styleCode bold italic underline strikethrough superscript styleText | blockquote numlist bullist',
-				//block_formats: 'Paragraph=div; Header 1=h1; Header 2=h2; Header 3=h3',
 				plugins: ['link', 'image', 'media', 'lists', 'code', 'autoresize'],
 				autoresize_bottom_margin: 0,
 				link_target_list: false,