Page 1 of 1

TinyMCE- Cleaning my code? Need Help!

Posted: Sun Jan 27, 2008 6:56 pm
by samcarducci
I am trying to insert some code in a Custom HTML Module and the problem is that Joomla! Keeps taking out my Java script, whether I put it in a Article or Custom Module. I think I have the TinyMCE setup right! Here is my code.

Code: Select all

<script type="text/javascript" src="templates/rt_mediamogul/js/
rokvideoscroller.js"></script>
<script type="text/javascript">
window.addEvent('domready', function() {
var x = new RokVideoScroller('video-list',{
'duration': 1000
});
});
</script>
<div id="video-list" class="video-list">
<div class="video">
<div class="left">
<img alt="" src="images/stories/[youtube]/doomsday.jpg" />

</div>
<div class="video">
<div class="left">
<img alt="" src="images/stories/[youtube]/sample.jpg" />
</div>
<div class="desc">
<p>Politicians Hold a Summit</p>
<p><a href="#">Watch Video</a></p>
</div>
</div>
<div class="video">
<div class="left">
<img alt="" src="images/stories/[youtube]/sample.jpg" />
</div>
<div class="desc">

<p>Popular Pub Past Prime</p>
<p><a href="#">Watch Video</a></p>
</div>
</div>
<div class="video">
<div class="left">
<img alt="" src="images/stories/[youtube]/sample.jpg" />
</div>
<div class="desc">
<p>Animal Couples Go Boating</p>
<p><a href="#">Watch Video</a></p>
</div>
</div>

<div class="video">
<div class="left">
<img alt="" src="images/stories/[youtube]/sample.jpg" />
</div>
<div class="desc">
<p>Here's Looking at You Kid</p>
<p><a href="#">Watch Video</a></p>
</div>
</div>
<div class="video">
<div class="left">
<img alt="" src="images/stories/[youtube]/sample.jpg" />
</div>
<div class="desc">
<p>Riots In BlockTown Again</p>

<p><a href="#">Watch Video</a></p>
</div>
</div>
<div class="video">
<div class="left">
<img alt="" src="images/stories/[youtube]/sample.jpg" />
</div>
<div class="desc">
<p>Unhappy Pet Seeks Vengeance</p>
<p><a href="#">Watch Video</a></p>
</div>
</div>
<div class="video">
<div class="left">

<img alt="" src="images/stories/[youtube]/sample.jpg" />
</div>
<div class="desc">
<p>Hunting Season Opens Today</p>
<p><a href="#">Watch Video</a></p>
</div>
</div>

</div>


Can somebody please help me figure this out, Thank You Sam Carducci

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Wed Mar 05, 2008 4:29 am
by hatchmo
There is no WYSIWYG editor for Joomla that does not corrupt HTML in some way. TinyMCE will strip out your custom code, others will insist on inserting code that you never typed.
For what you're trying to do, go to Global Configuration and set the Default WYSIWYG Editor to "No WYSIWYG Editor". Then paste in your code.

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Sat Mar 08, 2008 1:36 pm
by Els
I'm having the same problem, despite editing the php files adding my code to the valid_elements lists.
Of course this is a TinyMCE issue, and not a Joomla one, but the thing is that the version shipped with Joomla is from 2006. The current TinyMCE version on their site, 3.0.4.1, does what I want properly.
From a post by 'Hackwar' on this forum I quote:
In any case, TinyMCE is a 3P editor, which we just update and distribute together with J!.
That's just fine with me, if it was actually updated indeed.
Just overwriting the current mambot files with the new TinyMCE version files results in not having any editor at all in Joomla, so.. any advice anyone?

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Fri Mar 14, 2008 4:18 am
by Don Spog
It would be great to get some advice. I have been having a lot of problems running TinyMCE with Firefox... the popup windows are way too small. I don't really want to add JCE or any other editor since I like to stick to the native modules to joomla.

Anyone know how to upgrade to the latest TinyMCE???

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Wed Apr 09, 2008 4:36 pm
by Lost-Joomler
I would be interested to know this too.

TinyMCe is stripping my code if I try to insert javascript.

Is there a workaround for this?

I've been reading about installing JoomlaFCKeditor2.5.1 but it won't install and their forum is a gohst town.

I've also read about changing some lines of code in some files but the lines were not identicale to mine.

Is there onother editor we can use that won't strip the code?

Or How would I manually change the code in the config file to get the "no editor" to work currently it coded as var $editor = 'tinymce';

Thanks
Frank

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Thu May 29, 2008 9:58 am
by Toniob
Hi,

I found a way to insert javascript into joomla's tinymce :

in your tinymce.php
add 'script[language|type|src]' to the extended_valid_elements param,

and disable 'cleanup' by changing the line :

Code: Select all

$cleanup			= $params->def( 'cleanup', 				1 );
to

Code: Select all

$cleanup			= $params->def( 'cleanup', 				0 );

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Thu May 29, 2008 10:19 am
by Els
and disable 'cleanup' by changing the line
ISTM that that has the exact same effect as setting "Code Cleanup" in the parameters in the TinyMCE bot to "Off".
It will disable all cleanup, which means you may end up with uglier code than planned.

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Mon Sep 01, 2008 5:50 pm
by sonicth
tinymce is worse than ever (tried it few years back when id DID NOT clean up html).
Why cant you just have a button - DONT clean up html! ugh!!!! >:(

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Wed Nov 12, 2008 7:07 pm
by syberion
ISTM that that has the exact same effect as setting "Code Cleanup" in the parameters in the TinyMCE bot to "Off".
At least in 1.0.x, setting Code Cleanup to off in the bot parameters has no effect whatsoever. It still strips my tags and rewrites my URL parameters. I have tested this in about 10 sites ranging from 1.0.12 - 15. Haven't tried the TinyMCE build bundled with 1.5 yet.

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Thu Nov 13, 2008 1:12 am
by zorro128
After upgrade to joomla 1.5.8 I can not add [youtube] video to my articles. Tiny mce adds some strange tags and strips some params of video.

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Fri Nov 14, 2008 8:22 am
by Hawkthalas
<wise voice> TURN THE EDITOR OFF! </wise voice>

You made my day bro, many thx.. at last i can code..

/cry

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Fri Nov 14, 2008 8:38 am
by zorro128

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Sun Nov 16, 2008 11:26 pm
by Timeisnow
Still have problems: Cannot insert this: <!--IMAGE images/stories/rotator/illuminati.jpg IMAGE-->

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Wed Dec 10, 2008 2:55 pm
by luvabull
I'm having major problems inserting flash, or just basic CSS even with no editor selected. Yes I have made sure that the blacklist feature is selected for everything below super admin. I even turned on blacklist for just public.

Still doesn't work. All my scripts are stripped, and I cannot build websites the way I used to with joomla.

What file contains the parameters for blacklist. I just want to have any script tag allowed for super admin.

It seems like the blacklist is stuck to "on" for all users.

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Wed Dec 10, 2008 4:38 pm
by dougc
Me too. I upgraded to 1.5.8 yesterday and now scripts are cleaned up even using the "no editor" setting.

I'd love to know of a fix if anyone has one.

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Wed Dec 10, 2008 8:21 pm
by Timeisnow
Open the parameters from INSIDE the article manager. (click the button)

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Wed Dec 10, 2008 9:17 pm
by luvabull
I did open the parameters from inside the article manager. I set the Blacklist for Manager and below. Still script stripping.

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Thu Dec 11, 2008 6:32 am
by Timeisnow
Oh yeah, sorry, I forgot the part from the article I read (cant dig iot up now) about how you have to specify the user group, & be sure to select superadmin. - I had the same ANNOYING AS HELL problem, & it has taken a few days of sleep from my past, but that's okay... What doesnt kill me will make me stronger, & will be updated & fixed.

Hope this helps ;-)

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Thu Dec 11, 2008 12:04 pm
by luvabull
This is what I'm trying to enter in... tried with editor and without. With blacklist with white list and many different settings....

Always get the same thing.

I enter in this :

<div style="float: left; width: 250px; height: 180px; border: solid #141414 10 px; background: url (images/yootheme/pchlogin.jpg)"></div>

<div style="float: right; width: 230px; height: 160px; border: solid #141414 10 px; background: url (images/yootheme/pclogin.jpg) ; padding:10px"> {loadposition content1} </div>

I get this :

<div style="float: left; width: 250px; height: 180px;"></div>
<div style="padding: 10px; float: right; width: 230px; height: 160px;">{loadposition content1}</div>

Unless I use no editor then the code appears to be the same, however my background images don't load.

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Sat Aug 15, 2009 12:48 am
by jaydenl
This topic is still un-answered. If someone could post the correct answer, I'm sure it would benefit many.

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Tue Jan 19, 2010 6:38 pm
by MALdito
For this and some other reasons, I have always used JCE. However, I'm running a community site now, and I'm a bit nervous about installing such a heavy editor for the masses. But then, tinyMCE does not even support embedded code from [youtube].

Re: TinyMCE- Cleaning my code? Need Help! [One Solution]

Posted: Mon Apr 12, 2010 4:18 pm
by ponyack
I know this is an old post but I had similar problem

When I added code using the TinyMCE via the HTML or Toggle Editor the <script> tag would change once I hit apply - it would read <mce:script>

I resolved the problem by choosing No Editor in the global configuration

AND

Disabling the TinyMCE in the Plug-ins sections

This worked and then I re-enabled the TinyMCE.

Hope this helps


Ponyack

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Tue Sep 27, 2011 4:32 pm
by SmeggyBrit
jaydenl wrote:This topic is still un-answered. If someone could post the correct answer, I'm sure it would benefit many.
Seconded.

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Sun Oct 09, 2011 5:16 pm
by Beata
Nothing help ...

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Fri Feb 10, 2012 4:10 pm
by kkhisa
SmeggyBrit, Beata,

This may be coming years later but ponyack response Posted: Mon Apr 12, 2010 4:18 pm worked for me!

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Mon Feb 13, 2012 7:26 am
by nwsisu
This method worked for me (I use Joomla 2.5, but I think it works on 1.7 and maybe earlier versions too):

Of course, set filtering to "No Filter"

On [youtube], go to the video, click "Share" -> "Embed", select "Use old embed code",

Copy the code.

Inserting the code into the article:

In the article manager (TinyMCE), toggle to HTML, and paste the code (do NOT use the "Insert/Edit embedded media"!

Once the code is placed, THEN you can edit it using"Insert/Edit embedded media".

---- on edit, I want to mention: no need to disable TinyMSE :)

Re: TinyMCE- Cleaning my code? Need Help!

Posted: Fri Sep 21, 2012 4:02 pm
by lip420
nwsisu wrote:This method worked for me (I use Joomla 2.5, but I think it works on 1.7 and maybe earlier versions too):

Of course, set filtering to "No Filter"

On [youtube], go to the video, click "Share" -> "Embed", select "Use old embed code",

Copy the code.

Inserting the code into the article:

In the article manager (TinyMCE), toggle to HTML, and paste the code (do NOT use the "Insert/Edit embedded media"!

Once the code is placed, THEN you can edit it using"Insert/Edit embedded media".

---- on edit, I want to mention: no need to disable TinyMSE :)
I am on 2.5 now and I tried that and it doesn't work for me. It's still stripping the code.