Answers for "execcommand insert video"

PHP
0

execcommand insert video

insertYouTube: function () { /* This can be improved */		var urlPrompt = prompt("Enter Youtube Url:", "http://");		var urlReplace = urlPrompt.replace("watch?v=", "embed/");		var embed = '<iframe title="YouTube video player" src="'+urlReplace+'" allowfullscreen="true" width="480" frameborder="0" height="390">';		if($.browser.msie){			document.createRange().pasteHTML(embed)		}else{			document.execCommand("Inserthtml", false, embed);		}		}
Posted by: Guest on June-25-2020

Browse Popular Code Answers by Language