I was wondering if the code could be modified/adapted or included to have it insert a YouTube video.

Basically a CCK field where the user pastes a YouTube link, and then when insert is pressed, it inserts the proper embed code into the WYSIWYG editor. Voila, youtube video.

Comments

nvreyes’s picture

Subscribing. Was also wondering if this could be used for YouTube or Vimeo.

quicksketch’s picture

Status: Active » Closed (duplicate)

Yep, most likely. The other question is what module would you even use to select a YouTube/Vimeo URL. As with #470366: Work with other CCK fields besides FileField/ImageField (Node Reference, Text, Emfield, etc), the largest problem is that it would require an AJAX request to the server to generate the appropriate embed code from whatever the user inputs. With image/files we have the ability to generate this information while the file is being uploaded, which already does an AJAX request for us.

Considering similar difficulties, I'm going to refer people over to #470366: Work with other CCK fields besides FileField/ImageField (Node Reference, Text, Emfield, etc).