tinymce.full.js
function () {
        var self = this, settings = self.settings, menu, parent = self.parent();

        parent.items().each(function (ctrl) {
          if (ctrl !== self) {
            ctrl.hideMenu();
          }
        });

        if (settings.menu) {
          menu = self.menu;

          if (!menu) {
            menu = settings.menu;

            // Is menu array then auto constuct menu control
            if (menu.length) {
              menu = {
                type: 'menu',
                items: menu
              };
            } else {
              menu.type = menu.type || 'menu';
            }

            if (parent.settings.itemDefaults) {
              menu.itemDefaults = parent.settings.itemDefaults;
            }

            menu = self.menu = Factory.create(menu).parent(self).renderTo();
            menu.reflow();
            menu.on('cancel', function (e) {
              e.stopPropagation();
              self.focus();
              menu.hide();
            });
            menu.on('show hide', function (e) {
              if (e.control.items) {
                e.control.items().each(function (ctrl) {
                  ctrl.active(ctrl.settings.selected);
                });
              }
            }).fire('show');

            menu.on('hide', function (e) {
              if (e.control === menu) {
                self.classes.remove('selected');
              }
            });

            menu.submenu = true;
          } else {
            menu.show();
          }

          menu._parentMenu = parent;

          menu.classes.add('menu-sub');

          var rel = menu.testMoveRel(
            self.getEl(),
            self.isRtl() ? ['tl-tr', 'bl-br', 'tr-tl', 'br-bl'] : ['tr-tl', 'br-bl', 'tl-tr', 'bl-br']
          );

          menu.moveRel(self.getEl(), rel);
          menu.rel = rel;

          rel = 'menu-sub-' + rel;
          menu.classes.remove(menu._lastRel).add(rel);
          menu._lastRel = rel;

          self.classes.add('selected');
          self.aria('expanded', true);
        }
      }
function () {
        var self = this, settings = self.settings, menu, parent = self.parent();

        parent.items().each(function (ctrl) {
          if (ctrl !== self) {
            ctrl.hideMenu();
          }
        });

        if (settings.menu) {
          menu = self.menu;

          if (!menu) {
            menu = settings.menu;

            // Is menu array then auto constuct menu control
            if (menu.length) {
              menu = {
                type: 'menu',
                items: menu
              };
            } else {
              menu.type = menu.type || 'menu';
            }

            if (parent.settings.itemDefaults) {
              menu.itemDefaults = parent.settings.itemDefaults;
            }

            menu = self.menu = Factory.create(menu).parent(self).renderTo();
            menu.reflow();
            menu.on('cancel', function (e) {
              e.stopPropagation();
              self.focus();
              menu.hide();
            });
            menu.on('show hide', function (e) {
              if (e.control.items) {
                e.control.items().each(function (ctrl) {
                  ctrl.active(ctrl.settings.selected);
                });
              }
            }).fire('show');

            menu.on('hide', function (e) {
              if (e.control === menu) {
                self.classes.remove('selected');
              }
            });

            menu.submenu = true;
          } else {
            menu.show();
          }

          menu._parentMenu = parent;

          menu.classes.add('menu-sub');

          var rel = menu.testMoveRel(
            self.getEl(),
            self.isRtl() ? ['tl-tr', 'bl-br', 'tr-tl', 'br-bl'] : ['tr-tl', 'br-bl', 'tl-tr', 'bl-br']
          );

          menu.moveRel(self.getEl(), rel);
          menu.rel = rel;

          rel = 'menu-sub-' + rel;
          menu.classes.remove(menu._lastRel).add(rel);
          menu._lastRel = rel;

          self.classes.add('selected');
          self.aria('expanded', true);
        }
      }
function ( ) { var self = this , settings = self . settings , menu , parent = self . parent ( ) ; parent . items ( ) . each ( function ( ctrl ) { if ( ctrl !== self ) { ctrl . hideMenu ( ) ; } } ) ; if ( settings . menu ) { menu = self . menu ; if ( ! menu ) { menu = settings . menu ; // Is menu array then auto constuct menu control if ( menu . length ) { menu = { type : 'menu' , items : menu } ; } else { menu . type = menu . type || 'menu' ; } if ( parent . settings . itemDefaults ) { menu . itemDefaults = parent . settings . itemDefaults ; } menu = self . menu = Factory . create ( menu ) . parent ( self ) . renderTo ( ) ; menu . reflow ( ) ; menu . on ( 'cancel' , function ( e ) { e . stopPropagation ( ) ; self . focus ( ) ; menu . hide ( ) ; } ) ; menu . on ( 'show hide' , function ( e ) { if ( e . control . items ) { e . control . items ( ) . each ( function ( ctrl ) { ctrl . active ( ctrl . settings . selected ) ; } ) ; } } ) . fire ( 'show' ) ; menu . on ( 'hide' , function ( e ) { if ( e . control === menu ) { self . classes . remove ( 'selected' ) ; } } ) ; menu . submenu = true ; } else { menu . show ( ) ; } menu . _parentMenu = parent ; menu . classes . add ( 'menu-sub' ) ; var rel = menu . testMoveRel ( self . getEl ( ) , self . isRtl ( ) ? [ 'tl-tr' , 'bl-br' , 'tr-tl' , 'br-bl' ] : [ 'tr-tl' , 'br-bl' , 'tl-tr' , 'bl-br' ] ) ; menu . moveRel ( self . getEl ( ) , rel ) ; menu . rel = rel ; rel = 'menu-sub-' + rel ; menu . classes . remove ( menu . _lastRel ) . add ( rel ) ; menu . _lastRel = rel ; self . classes . add ( 'selected' ) ; self . aria ( 'expanded' , true ) ; } }
Shows the menu for the menu item.

@method showMenu
Shows the menu for the menu item .