//attach a context menu item
FCK.ContextMenu.RegisterListener( {
AddItems : function( menu, tag, tagName )
{
// under what circumstances do we display this option - the condition
if ( tagName == 'P' ) {
// when the option is displayed, show a separator the command
menu.AddSeparator() ;
// the command needs the registered command name, the title for the context menu, and the icon path
menu.AddItem( 'InsertPath', FCKLang.InsertPath, oInsertPartItem.IconPath ) ;
}
}
}
);
Re: disable certain actions when in a table
http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Customization/Plug-ins/Context
//attach a context menu item FCK.ContextMenu.RegisterListener( { AddItems : function( menu, tag, tagName ) { // under what circumstances do we display this option - the condition if ( tagName == 'P' ) { // when the option is displayed, show a separator the command menu.AddSeparator() ; // the command needs the registered command name, the title for the context menu, and the icon path menu.AddItem( 'InsertPath', FCKLang.InsertPath, oInsertPartItem.IconPath ) ; } } } );Re: disable certain toolbar items when in a table
let me rephrase what i want to do:
(1) disable certain core toolbar buttons (e.g. <hr>) when the cursor is in the context of a table cell
(2) write a toolbar button plugin which is only active when the cursor is in the context of a able cell
i hope this makes it a bit clearer ...