jwplayer and tinymce - tinymce

I would like to get jw player to play nicely with tinymce. Currently, tinymce just strips the embed code out, or converts it to ... which breaks it.
first aim is to even allow the jw player code
a nice-to-have would be a button to add the code through the interface.
any help much appreciated

Here's how you can insert video to play in the JW Player in TinyMCE. You need to have the Media plugin added to the TinyMCE editor the ImageManager add-on installed.
Edit /tiny_mce/plugins/media/langs/en_dlg.js:
Anywhere after the first line insert:
allowfullscreen:"Allow Full Screen",
Edit /tiny_mce/plugins/media/media.htm:
Immediately after line 216 (contains the that ends the row that adds the Menu and Live Connect checkboxes to the Advanced section of the Insert Media dialog) insert:
{#media_dlg.allowfullscreen}
Edit /tiny_mce/plugins/media/js/media.js:
After line 73:
setBool(pl, 'flash', 'swliveconnect');
insert:
setBool(pl, 'flash', 'allowfullscreen');
After line 307 insert (Just before the code that detects a URL for YouTube has been used):
if (v.match(/(.+)(.*)\.flv/) || v.match(/(.+)(.*)\.mp4/)) {
f.width.value = '328';
f.height.value = '200';
f.src.value = '/mediaplayer/player.swf?file=' + v;
return 'flash';
}
(change '/mediaplayer/player.swf' to the location and name of your jw player swf file).
After line 382:
s += getBool('flash', 'swliveconnect', false);
insert:
s += getBool('flash', 'allowfullscreen', false);
Edit the ImageManager config file to allow upload of flv and mp4 files.
To insert a video, click the Insert Media button in the TinyMCE Editor Toolbar. Leave it set to Flash and Browse for the file. This will open the ImageManager. Upload the video file or select the file if it has already been uploaded to your ImageManager. The URL to the file will be inserted into the URL field of the Media dialog. This will give a preview of the video. You can change the size here is you like. Click the Insert button and a Flash Placeholder is inserted.

The answer from Barry Dixon worked from me, with a little fix in media.htm.
the onchange event did not fire in my case, as I use a personal file manager to choose the media file.
I just added an onblur event:
<td><input id="src" name="src" type="text" value="" class="mceFocus" onblur="switchType(this.value);generatePreview();" onchange="switchType(this.value);generatePreview();" /></td>

Related

How to center a video

I am using tinymce v5. I have enabled the media plugin and configure it to get the following html when a user insert a video:
<div class="embed-responsive embed-responsive-16by9"><iframe src="' + newUrl + '" class="embed-responsive-item" allowfullscreen="allowfullscreen"></iframe</div>';
In the editor, I can not find a way to center the video on the page. When "selecting" the video, i clicked on the align center button but nothing happen and nothing is added in the html code. Is there anything special that needs to be done? I would like to get the same thing as when I center an image.
Thx!

How to create a video plugin for Rich Text Editor

I need to create Video plugin for Rich Text Editor(RTE) in CQ5. I referred the following url “http://docs.adobe.com/docs/en/cq/current/administering/configuring_rich_text_editor.html” . There is no plugin ID for video.
I want to create new icon in RTE as edit and findreplce plugin. When we click on video icon, One dialog has to open with some input values to give video path and video heading.
Is there any video plugin available for RTE? Could anyone please guide me to create video plugin for RTE?
Thanks in advance.

How to use more than one ace:fileEntry tag in the same page?

I have a page that should contain two ace:fileEntry tags: one to upload an audio file and another to upload an image file. The page should also have a save button. When clicking on the save button, I want to check if both an audio file and an image file are selected to be uploaded.
How can I accomplish that?
http://jforum.icesoft.org/JForum/posts/list/21126.page
Here is where this question is being responded to on the ICEfaces forums.

Inserting and Displaying images within the TinyMCE content editor in PHP site

I am currently using tinyMCE to edit content within my site and I am looking for a way display an image within the tinyMCE once it has been uploaded to the site.
Note: I am not looking for a means to upload an image directly into tinyMCE. I am looking for the tinyMCE command which would allow me to display an image within the content in the editor after I have uploaded it.
Thanks
You could insert a regular img-tag inside tinymce using a custom plugin or using the setup parameter in your tinymce init. The src should refer to the html location of the image to be uploaded. As soon as the image is available the image will become visible on next reload of the editors content. If you need further assistance feel free to ask.
After successfull uploaded you have the source of the image (img_src). Now you need to add it to the editor like this
tinymce.activeEditor.insertContent('<img alt="photo" src="' + img_src + '"/>');

Tinymce - Convert image url to html image url

This is question about tinymce... Current image editor is slow for because it demands opening popup for every new picture I want to add. I have my own external image gallery where each image contains it's url so copy-paste of url's is very easy and fast...
I would like to have button similar to Bold that does following:
To editor I paste url of image (for example: www.site.com/image.jpg) and when i select this url and click on my new button it converts image url to <img src='www.site.com/image.jpg'> and shows image in editor.
I searched plugins and found nothing similar to this.
Any ideas?
Thanks in advance!
Ilija
solved!
In documentation there is example how to manipulate text in editor from external commands... end even set them as button