php-markdown icon indicating copy to clipboard operation
php-markdown copied to clipboard

[Feature Request] Tag for embedding YouTube videos

Open MightyPork opened this issue 11 years ago • 1 comments

I am using this regex to add support for YouTube videos:

"#@\[(.*?)\]\s*\(([a-z0-9.-]+)\)#i"
=>
'<iframe class="youtube" width="560" height="315" src="http://www.youtube.com/embed/$2?wmode=opaque" frameborder="0" allowfullscreen>$1</iframe>',

It allows the syntax @[Alt text] (YouTube-code) to be turned into a YT embed video.

It'd be nice to have this (or similar) thing in MarkupExtra, perhaps as a optional feature.

MightyPork avatar Sep 21 '13 11:09 MightyPork

I copy your code! Thanks!!

mdan312 avatar Jan 23 '15 21:01 mdan312