Hi all.

I know that I can create a html button with the following code: [video:%sometext%] to add the code for the video_filter, but that does not seem to be the best way.

Is there a way to add a popup field to ask for it? the js method seems to require the same start and end tags?

Help?

Comments

naheemsays’s picture

Version: 6.x-1.2 » 6.x-1.x-dev

Any ideas?

(also unrelated, but is there a way to integrate with img_assist?)

ufku’s picture

Here is a simple dialog requesting the video URL

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

insertMyVideo = function(tag, form) {
  BUE.dialog.close();
  var url = form.elements['attr_url'].value;
  if (url) BUE.active.replaceSelection('[video:'+ url +']', 'end');
}

or simpler js prompt:

js:
var url = prompt('Video URL');
if (url) E.replaceSelection('[video:'+ url +']');

Image assist issue: #122119: buEditor integration

naheemsays’s picture

Status: Active » Fixed

Thanks - works like a charm!

Actually both do, but I went with approach one as it fits in well with the other BUEditor dialogue boxes too.

Status: Fixed » Closed (fixed)

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