Page 1 of 1

Styles in TinyMCE

Posted: Sat Oct 08, 2005 6:49 pm
by saltydog
How can I limit the number of styles in tinyMCE? I'd like to give to the publshers only a fixed selected standard set of styles, not the whole template styles...

Re: Styles in TinyMCE

Posted: Mon Oct 17, 2005 3:24 am
by iNSiPiD
Create a cut-down stylesheet and point to that.

You can hard code the location of the stylesheet in TinyMCE.module.php as seen below.

Code: Select all

				<?php
				if (isset($gCms->variables['tinymce_stylesheet']))
				{
					$css = $gCms->variables['tinymce_stylesheet'];
	
					$striptags = $this->GetPreference('striptags', 'false');
	
					if ($striptags == 'true')
					{
						$css .= '&stripbackground=true';
					}
	// Path to custom stylesheet
				//	echo 'content_css : "' . $css . "\",\n";
					echo 'content_css : "/css/custom-style.css"',",\n";
				}
				?>

Re: Styles in TinyMCE

Posted: Mon Oct 17, 2005 7:50 am
by saltydog
Thanks!

But if I hard-code the patch, it will get lost at next CMS update..

Re: Styles in TinyMCE

Posted: Tue Oct 18, 2005 12:16 am
by iNSiPiD
saltydog, it's only a single line of code. Make a note of it or do a 'diff' at upgrade time.

For more information on 'diff' go here (I'm assuming you'r a Windows user):

http://www.thefreecountry.com/programmi ... ison.shtml

Re: Styles in TinyMCE

Posted: Tue Oct 18, 2005 7:43 am
by saltydog
Yes, thanks. I am not arguing the "complexity" of the changes... I am a Linux user, and I am very busy with updating contents to several CMS I made for the community, developing code and partecipating to debugging sessions. So it is hard to keep track to each customization I make on the standard versions.
I am used to keep software always upgraded to latest version.
In this case I should write comewhere (maybe in my head) to remember the changes I am making to current version of cmsmadesimple.
Ok, it is my job but - if you can -why don't introduce in next version this capacbility for all users?

Re: Styles in TinyMCE

Posted: Tue Oct 18, 2005 11:42 pm
by iNSiPiD
Sorry, salty. The "Windows user" comment wasn't meant as an insult. It's just that the diff tool I was referring to was available for Windows.

Anyway, yes, you are right. It should and probably will be added to a future release. But you need to understand that this is a 3rd party application that has then been fiitted for CMSMS by a forum user.

If you want to make changes then just make them and then advise the appropriate person so he can decide to add it to SVN or next version.