Styles in TinyMCE

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
saltydog
Power Poster
Power Poster
Posts: 281
Joined: Fri Mar 04, 2005 9:06 am

Styles in TinyMCE

Post 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...
iNSiPiD

Re: Styles in TinyMCE

Post 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";
				}
				?>
saltydog
Power Poster
Power Poster
Posts: 281
Joined: Fri Mar 04, 2005 9:06 am

Re: Styles in TinyMCE

Post by saltydog »

Thanks!

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

Re: Styles in TinyMCE

Post 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
saltydog
Power Poster
Power Poster
Posts: 281
Joined: Fri Mar 04, 2005 9:06 am

Re: Styles in TinyMCE

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

Re: Styles in TinyMCE

Post 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.
Post Reply

Return to “Modules/Add-Ons”