You are reading the Drake CMS Official Forums archive, available for historical purposes only.
Drake CMS has been rebranded into Lanius CMS, visit the new Lanius CMS Official Forums if you need support about Lanius CMS or Drake CMS -> Lanius CMS migration.
Hi there! I'm in the need to add <script> tag to the
tinyMCE editor.
I've tried to add in editor.php line
27 this code: extended_valid_elements :
"script[charset|defer|language|src|type],hr[class|width|size
|noshade]",
Telling to tinyMCE to allow the <script> tag but
this seems to not working??
Anyone can point me in the
right direction??
Thanks Bye Roberto
legolas558
Re: TinyMCE configuratio
05 July 2007 16:54
Anonymous
Maybe at the tinyMCE forums?
robx
Re: TinyMCE configuratio
05 July 2007 17:10
Anonymous
Hi Legolas! Yes! Sorry for this!
Just wanting to
be sure that only editor.php call the instance of tinyMCE then i
will go to tinyMCE forums!
Thanks Roberto
legolas558
Re: TinyMCE configuratio
05 July 2007 17:12
Anonymous
No problem - anyway editor.php contains the configuration for
that editor so is the only inclusion point for tinyMCE instances
robx
Re: TinyMCE configuratio
12 July 2007 15:00
Anonymous
Hi Legolas! I'm sorry but i've tried nearly everything in
the tinyMCE documentation and forums, but tinyMCE instance
continue to strip out tags...
I've added the
"valid_elements : "*[*]"," in instance
configuration and this work when updating but when saving the
tags are stripped/converted??
Does it make sense??
Thnx Bye Roberto
robx
Re: TinyMCE configuratio
12 July 2007 15:53
Anonymous
Hi I can confirm this beaviour on other tags (iframe for
example).
Tags are stripped just a little bit
pre-saving but i can't catch where in the code...
Bye
Roberto
legolas558
Re: TinyMCE configuratio
12 July 2007 16:14
Anonymous
Did you look at includes/xhtml.php ?
robx
Re: TinyMCE configuratio
13 July 2007 09:22
Anonymous
Hi Legolas! Yep i did not thinking about this!
I've added on line 21 in "./includes/xhtml.php": $my_kses->AddHTML('script',array('charset' => 1,'defer'
=> 1,'language' => 1,'src' => 1,'type' => 1));
And now <scripts> tags are OK!
Thanks so much for your support! Bye Roberto
legolas558
Re: TinyMCE configuratio
13 July 2007 09:47
Anonymous
No problem man Anyway, think about why the
script tags are filtered: they lead to XSS vulnerabilities.
Be sure to add those filter exceptions when the user
level is high enough (3 - Publisher for example)!
Otherwise a common user can submit a content with a script and
steal your admin session cookie (when you will read it) and steal
your website too!!!
robx
Re: TinyMCE configuratio
13 July 2007 13:41
Anonymous
Hi Legolas! Yes in my case there will be only 1-5 registered
users and so there will not be this possibility (as my dumbness
suggest ).
Anyway i was trying to put a google maps in a
content page so the only way was to use javascript, maybe in
future a google maps add-on/plugin can be a good idea?
Thanks Bye Roberto
jolulipa
Re: TinyMCE configuratio
06 August 2007 14:01
Anonymous
Great posting!1 I think this will solve my problem... I
cannot change font color(well, I can change it but then it woulb
be stripped) or para background. Does the change proposed in
this message will solve that problem too or should I add
something else?
legolas558
Re: TinyMCE configuratio
06 August 2007 14:14
Anonymous
You will probably have to modify the syntax to fit your specific
HMTL syntax needs...
We are supporting most of the
XHTML standard and also some HTML4.0, if you go outside them
you'll have to edit xhtml.php yourself
jolulipa
Re: TinyMCE configuratio
06 August 2007 14:38
Anonymous
Hi legolas558, yes, I understood that some time ago, but I still
have the answer of Font Color. I am not an expert in PHP, but If
you could be very kind in direct me to a possible solution. I
desperately need for Tiny MCE to recognise and implement font and
background colors... I will probaly find the solution on my own,
but will take me precious hours...
It will be far much faster if you can help me... Any way it
goes, thank you.
jolulipa
Re: TinyMCE configuratio
06 August 2007 19:00
Anonymous
Hi everyone.. I solved the Font coloring problem by modifying teh
/includes/xhtml.php file in the last five or six lines:
// non-XHTML valid, will be removed once the DOCTYPE is
Strict $my_kses->AddHTML('b'); $my_kses->AddHTML('i'); $my_kses->AddHTML('font',
array( 'face' => 1, 'color' => 1, 'size' => 1) );
I just added the 'color'
=> 1, line and VOILA!!!! tiny MCE now allows me to change the
color of fonts to any color I want....