Hello All,
Assume i have the following code:
// This code is defined in one file :
editor.addMenuItem = function( name, definition )
{
if ( groupsOrder[ definition.group ] )
menuItems[ name ] = new CKEDITOR.menuItem( this, name, definition );
};
// This code is defined in another file:
if (editor.addMenuItems) {
editor.addMenuItems({
footnote : {
label : 'Footnote',
command : 'footnote',
group : 'footnote'
},
citation : {
label : 'Citation',
command : 'citation',
group : 'footnote'
}
});
Can someone explain to me what the 2nd block of code means?
Does it mean : If the function editor.addMenuItems exists, then call it with the following parameters?? i.e If the function exists then execute the following:
{
editor.addMenuItems({
footnote : {
label : 'Footnote',
command : 'footnote',
group : 'footnote'
},
citation : {
label : 'Citation',
command : 'citation',
group : 'footnote'
}
});