How to create a video plugin for Rich Text Editor - plugins

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.

Related

Dropdown list for Insert/edit video

I am integrating TinyMCE in my CMS and want to have a feature to choose a video/audio by selecting media icon instead of typing the path in Source field.
[https://i.stack.imgur.com/1zmlD.png]
I was able to achieve this for choosing images through image_list
but, did not have luck using external_media_list_url
You are referencing documentation for TinyMCE 3.x which is no longer being updated. Your screenshot appears to be TinyMCE 4.x so you should look at the documentation for that release:
https://www.tinymce.com/docs/
There are APIs to create your own file picker for TinyMCE 4:
https://www.tinymce.com/docs/configure/file-image-upload/#file_picker_callback
...and example of that is here:
https://www.tinymce.com/docs/demo/file-picker/

How to stop tinymce convert an image url into img?

The queston is in the tittle. When I paste an image url into the textarea tinymce converts it into the image, How to force it leave only link?
Testing this on TinyMCE 4, on the full featured example given in the TinyMCE documentation, this does not seem to happen... When I paste an image URL there, the URL keeps there, no image replaces it.
What version of TinyMCE do you have? Do you have any custom plugin? Maybe this is being triggered by custom code?
You have to delete the plugin "paste"

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 + '"/>');

jwplayer and 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>

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