I have a plugin that does a simple insert of an OBJECT tag with a classid which is derived from a selection from a dropdownlist. This works.
What I now want to do is add an item to the context menu to show the classid. I tried to follow the rather cryptic example given here - http://docs.fckeditor.net/FCKeditor_2.x ... ns/Context
and assumed that I could simply check the tagName parameter in FCK.ContextMenu.RegisterListener( { AddItems: function(menu, tag, tagName) and if this = 'OBJECT' then add the classid to the menu. But I was rather surprised to find that the tagName parameter was 'IMG' (presumably the jigsaw piece image that is automatically displayed in the editor area) rather than the OBJECT tag which is shown in View Source. And while the tag parameter is an object, the src property points to the spacer.gif and none of the other usual proerties (id, name, etc) are available. So what is the tag parameter all about? Presumably it is not the same as the tag referred to by tagName, but does it relate to the current selected element and, if so, how do I access its properties and attributes? And, if not, how do I get the current selected element from within this function?
Any clues welcomed.
Jon
Thu, 09/17/2009 - 14:34
#1