AW: [opencms-dev] Customizing Fckeditor Font Format menu

Kai Schliemann k.schliemann at comundus.com
Mon May 22 13:33:19 CEST 2006


Hi Tane,

  I wrote an article for our company's wiki. It is in german. Currently I
have no time to translate it. But maybe it helps anyway.

#######################
 1. Selectbox Schriftformatierungen
Um Einträge aus der Selectbox Schriftformatierungen (FontFormats) zu
entfernen müssen folgende Dateien bearbeitet werden

    *
/system/workplace/resources/editors/fckeditor/editor/_source/classes/fcktool
barfontformatcombo.js
    * /system/workplace/resources/editors/fckeditor/fckconfig.js

1.1 fcktoolbarfontformatcombo.js
in Zeile 45 den Array oNames suchen und alle nicht gewünschten Einträge
einfach löschen. Achtung! Die Array-Werte in den eckigen Klammern nicht
ändern.
Beispiel:

alt:

	var oNames = {
		p		: aNames[0],
		pre		: aNames[1],
		address	        : aNames[2],
		h1		: aNames[3],
		h2		: aNames[4],
		h3		: aNames[5],
		h4		: aNames[6],
		h5		: aNames[7],
		h6		: aNames[8],
		div		: aNames[9]
	} ;

neu:

	var oNames = {
		p		: aNames[0],
		h1		: aNames[3],
		h2		: aNames[4],
		h3		: aNames[5],
	} ;


1.2 fckconfig.js
in Zeile 103 gehen und beim Attribut FCKConfig.FontFormats alle nicht
gewünschten Einträge einfach löschen.

alt:

FCKConfig.FontFormats	= 'p;pre;address;h1;h2;h3;h4;h5;h6;div' ;

neu:

FCKConfig.FontFormats	= 'p;h1;h2;h3' ;
#######################


Regards

i.A. Kai Schliemann
________________________________________________________________

Mit einem Klick alles im Blick, dank Informatik
Partner im Wissenschaftsjahr 2006 – www.Informatikjahr.de
________________________________________________________________

Dipl.-Wirt.Ing (FH)
Kai Schliemann


IT-Berater

comundus GmbH
Schüttelgrabenring 3, 71332 Waiblingen

Telefon  +49 (0)71 51-5 00 28-20
Internet www.comundus.com

IT EXCELLENCE by comundus.
________________________________________________________________






> -----Ursprüngliche Nachricht-----
> Von: opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-bounces at opencms.org]Im Auftrag von Tane Potaka
> Gesendet: Montag, 22. Mai 2006 08:31
> An: The OpenCms mailing list
> Betreff: [opencms-dev] Customizing Fckeditor Font Format menu
>
>
> Hi,
>
> I am using Fckeditor in OpenCms 6.2 in my xml content pages. I have put
> in the 'FontFormat' pull down menu so users can set heading size etc.
>
> At the moment, the menu contains : Normal, Normal (DIV), Formatted
> Address, Heading 1, Heading 2, Heading 3, Heading 4, Heading 5, Heading 6.
>
> Is there a way I can remove some of these options? I don't want my users
> to be able to set heading1 or heading 5 or 6.
>
> I have tried editing
> /system/workplace/resources/editors/fckeditor/editor/lang/en.js ,
> en-UK.js etc.
> Also have tried editing
> /system/workplace/resources/editors/fckeditor/fckconfig.js. Nothing
> seems to change it.
>
>
> Any help is greatly appreciated!!
>
> Cheers,
> Tane
>




More information about the opencms-dev mailing list