Download & Extend

Need help with a button that uses the pop-up form

Project:BUEditor
Version:5.x-1.1
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I'm trying to make a simple button that uses the default pop-up form, similar to what the URL and IMG forms do.

Basically I would like my output to be

[video:X]

Where X is the url of a video from a site like youtube or google.

So far, I've come up with this

js:
var form = [
{name: 'video:', title: 'URL of Video'},
];
eDefTagDialog('', form, 'Insert/edit video', 'OK');

of course that returns the following
< video:="http://youtube.com/watch?v=fmOE0V8-me8"></>

Any suggestions on what I can do to get this to work?

Comments

#1

FYI, I am trying to do this so i can use the video filter module
http://drupal.org/project/video_filter

#2

js:
var form = [
{name: 'video', title: 'URL of Video'},
];
eDefTagDialog('', form, 'Insert/edit video', 'OK', 'videoProcess');

videoProcess = function(tag, form) {
  var url = form.elements['attr_video'].value;
  editor.dialog.close();
  editor.active.replaceSelection('[video:'+ url +']');
}

#3

Killer, thanks a lot!

#4

Status:active» fixed

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here