Search code examples
javascriptjquerygoogle-apioembed

How can you detect a link in text and use oembed/jquery to change it (like Facebook, Twitter, etc.)


I want users to be able to copy and paste the link of something and, using oembed, paste it into a text box. From here I want to be able to identify the url and turn it into an oembed object or whatever you would call it. (e.x. Youtube Page=> URL=> textarea=> oembed=> embeded)


Solution

  • You can do it using the jquery oembed plugin:

    http://code.google.com/p/jquery-oembed/

    Hope this helps. Cheers