I can't get my context menu to work with my plugin. Alos, I am trying to get it to create a fake image so that there is something there in the editor.
Here is my code:
Please Help, Thank you much!
Here is my code:
// Context menu
FCK.ContextMenu.RegisterListener( {
AddItems : function( menu, tag, tagName )
{
// under what circumstances do we display this option
if ( tagName == 'IMG' && tag.parsedMap )
{
// No other options:
menu.RemoveAllItems() ;
// the command needs the registered command name, the title for the context menu, and the icon path
menu.AddItem( 'yahoo_maps', FCKLang.DlgGyahoo_mapsTitle, oyahoo_mapsItem.IconPath ) ;
}
}}
);
// Check if the comment it's one of our scripts:
var yahoo_maps_CommentsProcessorParser = function( oNode, oContent, index)
{
var oMap = new FCKyahoo_maps();
if ( oMap.parse( oContent ) )
oMap.createHtmlElement( oNode, index ) ;
else
{
if ( oMap.detectGoogleScript( oContent ) )
oNode.parentNode.removeChild( oNode );
}
}
FCKCommentsProcessor.AddParser( GoogleMaps_CommentsProcessorParser );
// Double click
FCK.RegisterDoubleClickHandler( editMap, 'IMG' ) ;
function editMap( oNode )
{
if ( !oNode.parsedMap)
return ;
FCK.Commands.GetCommand( 'yahoo_maps' ).Execute() ;
}
FCKyahoo_maps.prototype.createHtmlElement = function( oReplacedNode, index)
{
var oFakeNode = FCK.EditorDocument.createElement( 'IMG' ) ;
// Are we creating a new map?
if ( !oReplacedNode )
{
index = FCKTempBin.AddElement( this.BuildScript() ) ;
var prefix = ( FCKConfig.ProtectedSource._CodeTag || 'PS..' ) ;
oReplacedNode = FCK.EditorDocument.createComment( '{' + prefix + index + '}' ) ;
FCK.InsertElement(oReplacedNode);
}
oFakeNode.contentEditable = false ;
// oFakeNode.setAttribute( '_fckfakelement', 'true', 0 ) ;
oFakeNode.src = FCKConfig.FullBasePath + 'images/spacer.gif' ;
oFakeNode.setAttribute( '_fckrealelement', FCKTempBin.AddElement( oReplacedNode ), 0 ) ;
oFakeNode.setAttribute( '_fckBinNode', index, 0 ) ;
oFakeNode.style.display = 'block' ;
oFakeNode.style.border = '1px solid black' ;
oFakeNode.style.background = 'center center url("' + FCKPlugins.Items['yahoo_maps'].Path + 'images/maps_res_logo.png' + '") no-repeat' ;
oFakeNode.parsedMap = this ;
oReplacedNode.parentNode.insertBefore( oFakeNode, oReplacedNode ) ;
oReplacedNode.parentNode.removeChild( oReplacedNode ) ;
// dimensions
this.updateHTMLElement( oFakeNode );
return oFakeNode ;
}Please Help, Thank you much!

Re: Context Menu ++ SUPPORT?!!!