﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2687	Customize contextmenu using plugin	mardiros		"'''Plugins system is very cool''',[[BR]]
but actually you cannot write one which is available with a right click.

And in fact, it's possible with a 50 line patch ( inspired by the FCKCommands style ). '''See the file joined'''

And now you can customize the FCKConfig.ContextMenu with whatever you want written in a plugin.

For example, a plugin with predifine value for a textfield can be create and accessible via toolbar '''and context menu'''.

{{{
FCKCommands.RegisterCommand( 'DynTextField', new FCKDialogCommand( 'DynTextField', FCKLang.DynTextFieldDlgTitle, FCKPlugins.Items['DynTextField'].Path + 'fck_DynTextField.cfm', 350, 300 ) ) ;

var oDynTextFieldItem = new FCKToolbarButton( 'DynTextField', FCKLang.DynTextFieldBtn ) ;
oDynTextFieldItem.IconPath = FCKPlugins.Items['DynTextField'].Path + 'DynTextField2.gif' ;
FCKToolbarItems.RegisterItem( 'DynTextField', oDynTextFieldItem ) ;

FCK.ContextMenu.RegisterCommand('DynTextField', {
            AddItems : function( menu, tag, tagName )
            {
                if ( tagName == 'INPUT' && ( tag.type == 'text' || tag.type == 'password' ) )
                {
                    menu.AddSeparator() ;
                    menu.AddItem( 'DynTextField', FCKLang.TextFieldProp, 51 ) ;
                }
            }}) ; 

}}}



"	New Feature	closed	Low		General		invalid	HasPatch Pending	
