Forum

Thread tagged as: Problem, Addons, Redactor

Redactor - adding video button

Hi,

I'm not sure if anyone has tried this, but I am running the latest perch version and redactor v10 and I am looking at adding the 'Insert Video' button to Redactor.

I have followed what I think is the correct course of action being:

Downloading the plugin video.js file. this I have saved under "addons\plugins\editors\redactor\redactor\plugins\video.js"

and then added a link to this file under the redactor.js link within "addons\plugins\editors\redactor\redactor_config.inc".

Also within this file, I have adjusted the code so that, we have:

self.redactor({  
    imageUpload: 'PERCH_LOGINPATH/addons/plugins/editors/redactor/perch/upload.php?filetype=image',
    fileUpload: 'PERCH_LOGINPATH/addons/plugins/editors/redactor/perch/upload.php',
    uploadFileFields: uploadFields,
    uploadImageFields: uploadFields,
.......etc

    focus: true,
    plugins: ['video'],

.......etc

I did adjust the 'buttons' list to include 'video' within the redactor.js file, but this doesn't work. It also seems that the video.js file would sort this out anyway, as it seems to have a call to build the button and place it next to the 'insertImage' button.

Now I realise this is not a direct Perch qustion, but I am at a loss as to whether it is something I am doing incorrectly from a redactor side, or a Perch side.

Any ideas are welcome.

Thanks for any help,

Andy

Andrew Kennedy

Andrew Kennedy 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

There shouldn't be anything particularly different about how Perch creates the editor.

Can you get the video button working on a basic flat-file example?

I will have a go this evening and get back to you.....

Thanks Drew

Hmm, ok, I am using the example that they have at: https://imperavi.com/redactor/plugins/video/

To make my own standalone version, I have copied and pasted the code block they have on the page and created a new page in my root folder. I have taken a new copy of the video.js file and a new redactor,js from the download on the Perch site. I am running Perch 2.8.13, so everything should be ok.

All js and css files are being loaded and the redactor wysiwyg editor is appearing, but still no video button.

Maybe there's some difference between the redactor.js file that they use on the imperavi site versus that within the Perch download, but that doesn't make sense. You could (and I have) used insert video, from v9, so not sure why using v10 is causing me grief.

Surprised there is little on their site, which makes me believe I am doing something silly, as surely otherwise their demo page would have more content on what to do.....

Something is not correct. Just gone back into my site to edit an image that I have uploaded with Redactor and it does not allow me to edit this.

In other words, I can import an image, resize it, give it a title, link etc but once saved, if I go back into the entry, it does not allow me to select the image once more and edit.

Not sure it is all connected ?

This is a new clean install as well.

Apologies, forget last post, I jumped the gun.

The problem lied with me trying to add the video button previously and adjusting the _config.inc file to include:

focus: true,
plugins: ['video'],

Once removed, everything tickety-boo. Time for me to take a break I think !......

Tried a few more things and still no joy.

I will keep at it.

Andrew: Did you ever get this to work?

I'm trying to do the same thing.

I did get it working on an earlier version of Redactor but I can't remember what hoops I jumped through.

Hi Stefan, in the end we went in a different direction and this issue fell of the radar. I will open it back up to see if I can get it working.

Like you, I looked back at some of my previous installations and found that I had achieved this, but alas, for this latest revision, I could not get it working.

I will put some time into it over the next few days.