TinyMCE- Cleaning my code? Need Help!

This forum is for general questions about extensions for Joomla! version 1.5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
samcarducci
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sun Jan 27, 2008 6:39 pm

TinyMCE- Cleaning my code? Need Help!

Post by samcarducci » Sun Jan 27, 2008 6:56 pm

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
You do not have the required permissions to view the files attached to this post.

hatchmo
Joomla! Intern
Joomla! Intern
Posts: 95
Joined: Wed Jul 11, 2007 3:40 am

Re: TinyMCE- Cleaning my code? Need Help!

Post by hatchmo » Wed Mar 05, 2008 4:29 am

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.

Els
Joomla! Intern
Joomla! Intern
Posts: 52
Joined: Thu Dec 14, 2006 3:33 pm

Re: TinyMCE- Cleaning my code? Need Help!

Post by Els » Sat Mar 08, 2008 1:36 pm

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?

Don Spog
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Feb 28, 2008 1:49 am

Re: TinyMCE- Cleaning my code? Need Help!

Post by Don Spog » Fri Mar 14, 2008 4:18 am

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???

Lost-Joomler
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Mar 28, 2008 9:25 pm
Contact:

Re: TinyMCE- Cleaning my code? Need Help!

Post by Lost-Joomler » Wed Apr 09, 2008 4:36 pm

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

Toniob
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu May 29, 2008 9:49 am

Re: TinyMCE- Cleaning my code? Need Help!

Post by Toniob » Thu May 29, 2008 9:58 am

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 );

Els
Joomla! Intern
Joomla! Intern
Posts: 52
Joined: Thu Dec 14, 2006 3:33 pm

Re: TinyMCE- Cleaning my code? Need Help!

Post by Els » Thu May 29, 2008 10:19 am

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.

sonicth
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Dec 09, 2007 9:57 pm

Re: TinyMCE- Cleaning my code? Need Help!

Post by sonicth » Mon Sep 01, 2008 5:50 pm

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!!!! >:(

syberion
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Nov 07, 2007 1:16 am

Re: TinyMCE- Cleaning my code? Need Help!

Post by syberion » Wed Nov 12, 2008 7:07 pm

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.

zorro128
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 153
Joined: Tue Sep 27, 2005 7:27 am
Contact:

Re: TinyMCE- Cleaning my code? Need Help!

Post by zorro128 » Thu Nov 13, 2008 1:12 am

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.

User avatar
Hawkthalas
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Tue Oct 28, 2008 9:40 pm

Re: TinyMCE- Cleaning my code? Need Help!

Post by Hawkthalas » Fri Nov 14, 2008 8:22 am

<wise voice> TURN THE EDITOR OFF! </wise voice>

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

/cry

zorro128
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 153
Joined: Tue Sep 27, 2005 7:27 am
Contact:

Re: TinyMCE- Cleaning my code? Need Help!

Post by zorro128 » Fri Nov 14, 2008 8:38 am


User avatar
Timeisnow
Joomla! Explorer
Joomla! Explorer
Posts: 326
Joined: Tue Nov 04, 2008 12:34 am
Location: On the far side of the moon and/or under your chair
Contact:

Re: TinyMCE- Cleaning my code? Need Help!

Post by Timeisnow » Sun Nov 16, 2008 11:26 pm

Still have problems: Cannot insert this: <!--IMAGE images/stories/rotator/illuminati.jpg IMAGE-->
CriticalUnity.org - Need to Know Info
===> Clarifying conspiracy realities of mass deception for Humanity before it's too late....
THE TIME IS NOW to investigate!

luvabull
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Dec 06, 2008 11:35 pm

Re: TinyMCE- Cleaning my code? Need Help!

Post by luvabull » Wed Dec 10, 2008 2:55 pm

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.

dougc
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat Apr 26, 2008 2:22 am

Re: TinyMCE- Cleaning my code? Need Help!

Post by dougc » Wed Dec 10, 2008 4:38 pm

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.

User avatar
Timeisnow
Joomla! Explorer
Joomla! Explorer
Posts: 326
Joined: Tue Nov 04, 2008 12:34 am
Location: On the far side of the moon and/or under your chair
Contact:

Re: TinyMCE- Cleaning my code? Need Help!

Post by Timeisnow » Wed Dec 10, 2008 8:21 pm

Open the parameters from INSIDE the article manager. (click the button)
CriticalUnity.org - Need to Know Info
===> Clarifying conspiracy realities of mass deception for Humanity before it's too late....
THE TIME IS NOW to investigate!

luvabull
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Dec 06, 2008 11:35 pm

Re: TinyMCE- Cleaning my code? Need Help!

Post by luvabull » Wed Dec 10, 2008 9:17 pm

I did open the parameters from inside the article manager. I set the Blacklist for Manager and below. Still script stripping.

User avatar
Timeisnow
Joomla! Explorer
Joomla! Explorer
Posts: 326
Joined: Tue Nov 04, 2008 12:34 am
Location: On the far side of the moon and/or under your chair
Contact:

Re: TinyMCE- Cleaning my code? Need Help!

Post by Timeisnow » Thu Dec 11, 2008 6:32 am

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 ;-)
CriticalUnity.org - Need to Know Info
===> Clarifying conspiracy realities of mass deception for Humanity before it's too late....
THE TIME IS NOW to investigate!

luvabull
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Dec 06, 2008 11:35 pm

Re: TinyMCE- Cleaning my code? Need Help!

Post by luvabull » Thu Dec 11, 2008 12:04 pm

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.

User avatar
jaydenl
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Mar 11, 2009 4:15 pm
Location: Brisbane, Australia
Contact:

Re: TinyMCE- Cleaning my code? Need Help!

Post by jaydenl » Sat Aug 15, 2009 12:48 am

This topic is still un-answered. If someone could post the correct answer, I'm sure it would benefit many.
http://www.thermosis.com/ - Igniting the web
Signature rules - Literal URL's Only.

MALdito
Joomla! Intern
Joomla! Intern
Posts: 53
Joined: Mon Feb 27, 2006 6:22 am

Re: TinyMCE- Cleaning my code? Need Help!

Post by MALdito » Tue Jan 19, 2010 6:38 pm

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].

User avatar
ponyack
Joomla! Intern
Joomla! Intern
Posts: 89
Joined: Mon May 21, 2007 8:05 pm

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

Post by ponyack » Mon Apr 12, 2010 4:18 pm

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

SmeggyBrit
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Sep 27, 2011 4:28 pm

Re: TinyMCE- Cleaning my code? Need Help!

Post by SmeggyBrit » Tue Sep 27, 2011 4:32 pm

jaydenl wrote:This topic is still un-answered. If someone could post the correct answer, I'm sure it would benefit many.
Seconded.

User avatar
Beata
Joomla! Ace
Joomla! Ace
Posts: 1085
Joined: Fri Mar 02, 2007 2:06 pm
Location: Lithuania

Re: TinyMCE- Cleaning my code? Need Help!

Post by Beata » Sun Oct 09, 2011 5:16 pm

Nothing help ...

kkhisa
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Feb 10, 2012 3:58 pm

Re: TinyMCE- Cleaning my code? Need Help!

Post by kkhisa » Fri Feb 10, 2012 4:10 pm

SmeggyBrit, Beata,

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

nwsisu
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Feb 13, 2012 7:00 am
Location: Battle Ground, WA, USA
Contact:

Re: TinyMCE- Cleaning my code? Need Help!

Post by nwsisu » Mon Feb 13, 2012 7:26 am

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 :)

lip420
Joomla! Explorer
Joomla! Explorer
Posts: 468
Joined: Thu Feb 17, 2011 6:13 am

Re: TinyMCE- Cleaning my code? Need Help!

Post by lip420 » Fri Sep 21, 2012 4:02 pm

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.


Locked

Return to “Extensions for Joomla! 1.5”