TinyMCE - Insert / Edit embedded media - Video not showing?
-
- Joomla! Explorer
- Posts: 349
- Joined: Mon Dec 15, 2008 11:10 am
TinyMCE - Insert / Edit embedded media - Video not showing?
Hi
I try to insert a video into an article using the TinyMCE in extended mode.
I click the button: "Insert / Edit embedded media"
Then I paste an url from [youtube] into the File / URL field in the dialog box.
Type: Flash
When I leave the "File / URL" field, then the video show up in the preview area in the dialogbox.
Now, when I click Insert, I only see a yellow square with a flash icon in the middle.
When I save it and show the article on the frontend, then no video is displayed.
What do I have to do to make this work?
I try to insert a video into an article using the TinyMCE in extended mode.
I click the button: "Insert / Edit embedded media"
Then I paste an url from [youtube] into the File / URL field in the dialog box.
Type: Flash
When I leave the "File / URL" field, then the video show up in the preview area in the dialogbox.
Now, when I click Insert, I only see a yellow square with a flash icon in the middle.
When I save it and show the article on the frontend, then no video is displayed.
What do I have to do to make this work?
- srikanthg
- Joomla! Guru
- Posts: 509
- Joined: Tue Aug 05, 2008 11:34 am
- Location: Bangalore
- Contact:
Re: TinyMCE - Insert / Edit embedded media - Video not showi
Disable the TinyMCE in Global Configuration or For a particular user account.Then it should work.
Last edited by srikanthg on Wed Jul 07, 2010 11:53 am, edited 1 time in total.
-
- Joomla! Explorer
- Posts: 349
- Joined: Mon Dec 15, 2008 11:10 am
Re: TinyMCE - Insert / Edit embedded media - Video not showi
Could you please be more specific?srikanthg wrote:Disable the TinyMCE in Global Configuration or For a particular user account.Then it should word.
I do not understand what you mean.
- srikanthg
- Joomla! Guru
- Posts: 509
- Joined: Tue Aug 05, 2008 11:34 am
- Location: Bangalore
- Contact:
Re: TinyMCE - Insert / Edit embedded media - Video not showi
In your Global Settings set editor to "No Editor" and insert video.
OR
Create a new user account and set User Editor as "No Editor" for that user.Then login with this user account and embed videos in articles.
OR
Create a new user account and set User Editor as "No Editor" for that user.Then login with this user account and embed videos in articles.
-
- Joomla! Explorer
- Posts: 349
- Joined: Mon Dec 15, 2008 11:10 am
Re: TinyMCE - Insert / Edit embedded media - Video not showi
Hi
This sounds like a pretty weird solution.
Do you tell your customers to use your "workaround"? I definitely do not want to do that!
I want to use the TinyMCE built in solution for inserting videos to an article.
Why is it not working in TinyMCE, in Joomla 1.6 as is, and how can I make it work?
Maybe the TinyMCE editor in Joomla 1.6 filter away some tags when the code is inserted into the editor when I click the Insert button in "Insert / Edit embedded media" dialog....?
Does anybody know if this is the case?
This sounds like a pretty weird solution.
Do you tell your customers to use your "workaround"? I definitely do not want to do that!
I want to use the TinyMCE built in solution for inserting videos to an article.
Why is it not working in TinyMCE, in Joomla 1.6 as is, and how can I make it work?
Maybe the TinyMCE editor in Joomla 1.6 filter away some tags when the code is inserted into the editor when I click the Insert button in "Insert / Edit embedded media" dialog....?
Does anybody know if this is the case?
- srikanthg
- Joomla! Guru
- Posts: 509
- Joined: Tue Aug 05, 2008 11:34 am
- Location: Bangalore
- Contact:
Re: TinyMCE - Insert / Edit embedded media - Video not showi
All WYSIWYG editors strip any code pasted in them if they don't understand properly.bongobongo wrote:Hi
I want to use the TinyMCE built in solution for inserting videos to an article.
Why is it not working in TinyMCE, in Joomla 1.6 as is, and how can I make it work?
Maybe the TinyMCE editor in Joomla 1.6 filter away some tags when the code is inserted into the editor when I click the Insert button in "Insert / Edit embedded media" dialog....?
Does anybody know if this is the case?
Use some plugins to embed media :http://extensions.joomla.org/extensions/812/details
Last edited by srikanthg on Wed Jul 07, 2010 2:29 pm, edited 1 time in total.
-
- Joomla! Explorer
- Posts: 349
- Joined: Mon Dec 15, 2008 11:10 am
Re: TinyMCE - Insert / Edit embedded media - Video not showi
Hi
I appreciate the feedback
But none of them works in Joomla 1.6.
Well, disabling TinyMCE might work, but is not an option for me.
JoomlaWorks AllVideos are joomla 1.5 compatible.
I find it hard to belive that there is no setting in Joomla 1.6 that enable the inserted code from the TinyMCE "Insert / Edit embedded media" dialog to actually be inserted without beeing filtered.
I find in Joomla 1.6 in "Article managers" -> Options dialog -> Tab: Text filters
Is it not possible to set up Text filters in such way that the inserted code from the TinyMCE "Insert / Edit embedded media" dialog actually works (not get filtered)?
Anybody?
*** UPDATE ****
Here is the code that should have been inserted when using
the TinyMCE "Insert / Edit embedded media" dialog
(this is what is in the preview area of the dialog if you inspect it):
Here is the code that is actually left when looking at the code in TinyMCE after inserting the video:
Now if someone could tell me how to use the
"Article managers" -> Options dialog -> Tab: Text filters
so the video related stuff not get filtered out, then things would look a lot brighter
I have tried to do this the following here:
"Article managers" -> Options dialog -> Tab: Text filters
I have selected "Administrator" and "Super users" from "Filter groups"
Then I set "Filter type" to "Blacklist (Default)"
"Filter tags" and "Filter attributes" are both empty.
Then I try to insert a video into an article using the TinyMCE butto:
"Insert / Edit embedded media"
Flash, and just insert a [youtube] URL to the video.
The code that is inserted when I click Insert button in the dialog still gets filtered.... bahhhhh
Is the text filters not working yet?
I appreciate the feedback
But none of them works in Joomla 1.6.
Well, disabling TinyMCE might work, but is not an option for me.
JoomlaWorks AllVideos are joomla 1.5 compatible.
I find it hard to belive that there is no setting in Joomla 1.6 that enable the inserted code from the TinyMCE "Insert / Edit embedded media" dialog to actually be inserted without beeing filtered.
I find in Joomla 1.6 in "Article managers" -> Options dialog -> Tab: Text filters
Is it not possible to set up Text filters in such way that the inserted code from the TinyMCE "Insert / Edit embedded media" dialog actually works (not get filtered)?
Anybody?
*** UPDATE ****
Here is the code that should have been inserted when using
the TinyMCE "Insert / Edit embedded media" dialog
(this is what is in the preview area of the dialog if you inspect it):
Code: Select all
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="300" height="200" id="obj" name="eobj" align=""><param name="src" value="http://www.[youtube].com/v/LTGwBpigmKw&feature"><param name="url" value="http://www.[youtube].com/v/LTGwBpigmKw&feature"><param name="width" value="300"><param name="height" value="200"><param name="id" value="obj"><param name="name" value="eobj"><param name="align" value=""><embed type="application/x-shockwave-flash" src="http://www.[youtube].com/v/LTGwBpigmKw&feature" width="300" height="200" id="obj" name="eobj" align=""></object>
Code: Select all
<img src="http://www.mydomain.no/socrith/media/editors/tinymce/jscripts/tiny_mce/plugins/media/img/trans.gif" mce_src="media/editors/tinymce/jscripts/tiny_mce/plugins/media/img/trans.gif" class="mceItemFlash" title="src:'http://www.[youtube].com/v/LTGwBpigmKw&feature',width:'300',height:'200'" width="300" height="200" align=""><br mce_bogus="1">
"Article managers" -> Options dialog -> Tab: Text filters
so the video related stuff not get filtered out, then things would look a lot brighter
I have tried to do this the following here:
"Article managers" -> Options dialog -> Tab: Text filters
I have selected "Administrator" and "Super users" from "Filter groups"
Then I set "Filter type" to "Blacklist (Default)"
"Filter tags" and "Filter attributes" are both empty.
Then I try to insert a video into an article using the TinyMCE butto:
"Insert / Edit embedded media"
Flash, and just insert a [youtube] URL to the video.
The code that is inserted when I click Insert button in the dialog still gets filtered.... bahhhhh
Is the text filters not working yet?
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Jul 08, 2010 5:01 am
Re: TinyMCE - Insert / Edit embedded media - Video not showi
In my trials making changes to the text filter features in the Joomla admin does not appear to be working correctly.
As a temporary measure I have removed the black list used in the text filtering altogether:
In the filterinput.php file I deleted all the items from the blacklist arrays I didn't want blacklisted. You can probably just delete the ones that are used in your video code.
e.g.
Line 51
Line 51
As a temporary measure I have removed the black list used in the text filtering altogether:
In the filterinput.php file I deleted all the items from the blacklist arrays I didn't want blacklisted. You can probably just delete the ones that are used in your video code.
e.g.
Line 51
Code: Select all
* @var array A list of the default blacklisted tags.
*/
var $tagBlacklist = array ('applet', 'body', 'bgsound', 'base', 'basefont', 'embed', 'frame', 'frameset', 'head', 'html', 'id', 'iframe', 'ilayer', 'layer', 'link', 'meta', 'name', 'object', 'script', 'style', 'title', 'xml');
/**
* @var array A list of the default blacklisted tag attributes.
*/
var $attrBlacklist = array ('action', 'background', 'codebase', 'dynsrc', 'lowsrc'); // also will strip ALL event handlers
Code: Select all
* @var array A list of the default blacklisted tags.
*/
var $tagBlacklist = array ('body');
/**
* @var array A list of the default blacklisted tag attributes.
*/
var $attrBlacklist = array ('lowsrc'); // also will strip ALL event handlers
-
- Joomla! Explorer
- Posts: 349
- Joined: Mon Dec 15, 2008 11:10 am
Re: TinyMCE - Insert / Edit embedded media - Video not showi
A bug has been opened in the tracker:
See:
http://joomlacode.org/gf/project/joomla ... m_id=21338
I really hope this will be fixed ASAP.
See:
http://joomlacode.org/gf/project/joomla ... m_id=21338
I really hope this will be fixed ASAP.
-
- Joomla! Explorer
- Posts: 349
- Joined: Mon Dec 15, 2008 11:10 am
Re: TinyMCE - Insert / Edit embedded media - Video not showi
I tried to change the filterinput.php so $tagBlacklist and $attrBlacklist look like this:
Did not work after that change was made... by some reason....
Anything else that need a change to make it work?
Code: Select all
* @var array A list of the default blacklisted tags.
*/
var $tagBlacklist = array ('body');
/**
* @var array A list of the default blacklisted tag attributes.
*/
var $attrBlacklist = array ('lowsrc'); // also will strip ALL event handlers
Anything else that need a change to make it work?
- srikanthg
- Joomla! Guru
- Posts: 509
- Joined: Tue Aug 05, 2008 11:34 am
- Location: Bangalore
- Contact:
Re: TinyMCE - Insert / Edit embedded media - Video not showi
I guess this Plugin should work with J1.6 also(but i did't check).Check it and let me know how it works.bongobongo wrote:Hi
JoomlaWorks AllVideos are joomla 1.5 compatible.
-
- Joomla! Explorer
- Posts: 349
- Joined: Mon Dec 15, 2008 11:10 am
Re: TinyMCE - Insert / Edit embedded media - Video not showi
Please do not post anymore JoomlaWorks stuff in this thread!
This thread is about inserting videos using TinyMCE editor.
This thread is about inserting videos using TinyMCE editor.
-
- Joomla! Explorer
- Posts: 349
- Joined: Mon Dec 15, 2008 11:10 am
Re: TinyMCE - Insert / Edit embedded media - Video not showi
Found something interesting:
When you click the "Insert" button in the "Insert / Edit embedded media" dialog in TinyMCE
then it run the JS function "insertMedia()" in this file:
/media/editors/tinymce/jscripts/tiny_mce/plugins/media/js/media.js
What happens is that this test:
never runs, which cause the function to run the code inside the ELSE block instead, and I belive this just output an IMG tag.
If somebody understand how to make the first part of the IF to work, please post an explanation here?
*** UPDATE - tested in joomla 1.5.x ****
I have tested the same feature in TinyMCE in Joomla 1.5.x
The code in media.js for that version look very similar to the code used for Joomla 1.6.
In Joomla 1.5.x it does not strip away the object tag, in the editor it does not look good because the only thing I see there is a yellow "placeholder" for the video, but when one view the article on the front-end then it works like a charm.
So I guess it must be the Text filter bug that causes the problems in joomla 1.6
When you click the "Insert" button in the "Insert / Edit embedded media" dialog in TinyMCE
then it run the JS function "insertMedia()" in this file:
/media/editors/tinymce/jscripts/tiny_mce/plugins/media/js/media.js
What happens is that this test:
Code: Select all
if (fe != null && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) {
If somebody understand how to make the first part of the IF to work, please post an explanation here?
*** UPDATE - tested in joomla 1.5.x ****
I have tested the same feature in TinyMCE in Joomla 1.5.x
The code in media.js for that version look very similar to the code used for Joomla 1.6.
In Joomla 1.5.x it does not strip away the object tag, in the editor it does not look good because the only thing I see there is a yellow "placeholder" for the video, but when one view the article on the front-end then it works like a charm.
So I guess it must be the Text filter bug that causes the problems in joomla 1.6
-
- Joomla! Explorer
- Posts: 349
- Joined: Mon Dec 15, 2008 11:10 am
Re: TinyMCE - Insert / Edit embedded media - Video not showi
I just want to confirm that the "hack" presented by f3cp earlier in this thread actually do work.
What I did was to edit this file:
/libraries/joomla/filter/filterinput.php
And change this variable ($tagBlacklist) so it look like this: (just removed object and embed):
You do not even have to mess with the "Extended Valid Elements" in the TinyMCE plugin, leave it empty.
But you might have to set "Functionality": to Extended in the plugin, in order to see the "Insert / edit embedded media" button (the one that looks like a film-strip).
This way you can omit the bug in Joomla (that the dev team are working to fix) and finally be able to insert video into your Joomla 1.6 articles, when using TinyMCE.
Just be aware that next time you update Joomla 1.6 you will have to remember to replace the filterinput.php file.
Hope this helps some other that otherwise have to use hours to figure this mess out.
What I did was to edit this file:
/libraries/joomla/filter/filterinput.php
And change this variable ($tagBlacklist) so it look like this: (just removed object and embed):
Code: Select all
var $tagBlacklist = array ('applet', 'body', 'bgsound', 'base', 'basefont',
'frame', 'frameset', 'head', 'html', 'id', 'iframe', 'ilayer', 'layer', 'link',
'meta', 'name', 'script', 'style', 'title', 'xml');
But you might have to set "Functionality": to Extended in the plugin, in order to see the "Insert / edit embedded media" button (the one that looks like a film-strip).
This way you can omit the bug in Joomla (that the dev team are working to fix) and finally be able to insert video into your Joomla 1.6 articles, when using TinyMCE.
Just be aware that next time you update Joomla 1.6 you will have to remember to replace the filterinput.php file.
Hope this helps some other that otherwise have to use hours to figure this mess out.
-
- Joomla! Fledgling
- Posts: 4
- Joined: Thu May 06, 2010 11:25 pm
Re: TinyMCE - Insert / Edit embedded media - Video not showi
the hack that bongobongo suggested worked great for me even while using a different editor (CKEditor). So this could be a universal quick fix. Thanks for your help!
-
- Joomla! Apprentice
- Posts: 10
- Joined: Fri Jan 07, 2011 2:15 am
Re: TinyMCE - Insert / Edit embedded media - Video not showi
Nice... This was bugging the s*** out of me. Thanks for posting that fix guys. Works great for me! There's gotta be a more user friendly way to adjust what tags are filtered from the back end. Hopefully they fix that.