Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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);		}		}
Source by www.daniweb.com #
 
PREVIOUS NEXT
Tagged: #execcommand #insert #video
ADD COMMENT
Topic
Name
4+6 =