php-markdown
php-markdown copied to clipboard
[Feature Request] Tag for embedding YouTube videos
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.
I copy your code! Thanks!!