src/widgets/InlineMenu.js
function InlineMenu(editor, menuText) {
        /**
         * The list of items to display
         *
         * @type {Array.<{id: number, name: string>}
         */
        this.items = [];

        /**
         * The selected position in the list; otherwise -1.
         *
         * @type {number}
         */
        this.selectedIndex = -1;


        /**
         * Is the list currently open?
         *
         * @type {boolean}
         */
        this.opened = false;


        /**
         * The editor context
         *
         * @type {Editor}
         */
        this.editor = editor;


        /**
         * The menu selection callback function
         *
         * @type {Function}
         */
        this.handleSelect = null;

        /**
         * The menu closure callback function
         *
         * @type {Function}
         */
        this.handleClose = null;

        /**
         * The menu object
         *
         * @type {jQuery.Object}
         */
        this.$menu =
            $("<li class='dropdown inlinemenu-menu'></li>")
                .append($("<a href='#' class='dropdown-toggle' data-toggle='dropdown'></a>")
                        .hide())
                .append("<ul class='dropdown-menu'>" +
                            "<li class='inlinemenu-header'>" +
                                "<a>" + menuText + "</a>" +
                            "</li>" +
                         "</ul>");

        this._keydownHook = this._keydownHook.bind(this);
    }
function InlineMenu(editor, menuText) {
        /**
         * The list of items to display
         *
         * @type {Array.<{id: number, name: string>}
         */
        this.items = [];

        /**
         * The selected position in the list; otherwise -1.
         *
         * @type {number}
         */
        this.selectedIndex = -1;


        /**
         * Is the list currently open?
         *
         * @type {boolean}
         */
        this.opened = false;


        /**
         * The editor context
         *
         * @type {Editor}
         */
        this.editor = editor;


        /**
         * The menu selection callback function
         *
         * @type {Function}
         */
        this.handleSelect = null;

        /**
         * The menu closure callback function
         *
         * @type {Function}
         */
        this.handleClose = null;

        /**
         * The menu object
         *
         * @type {jQuery.Object}
         */
        this.$menu =
            $("<li class='dropdown inlinemenu-menu'></li>")
                .append($("<a href='#' class='dropdown-toggle' data-toggle='dropdown'></a>")
                        .hide())
                .append("<ul class='dropdown-menu'>" +
                            "<li class='inlinemenu-header'>" +
                                "<a>" + menuText + "</a>" +
                            "</li>" +
                         "</ul>");

        this._keydownHook = this._keydownHook.bind(this);
    }
function InlineMenu ( editor , menuText ) { /**
         * The list of items to display
         *
         * @type {Array.<{id: number, name: string>}
         */ this . items = [ ] ; /**
         * The selected position in the list; otherwise -1.
         *
         * @type {number}
         */ this . selectedIndex = - 1 ; /**
         * Is the list currently open?
         *
         * @type {boolean}
         */ this . opened = false ; /**
         * The editor context
         *
         * @type {Editor}
         */ this . editor = editor ; /**
         * The menu selection callback function
         *
         * @type {Function}
         */ this . handleSelect = null ; /**
         * The menu closure callback function
         *
         * @type {Function}
         */ this . handleClose = null ; /**
         * The menu object
         *
         * @type {jQuery.Object}
         */ this . $menu = $ ( "<li class='dropdown inlinemenu-menu'></li>" ) . append ( $ ( "<a href='#' class='dropdown-toggle' data-toggle='dropdown'></a>" ) . hide ( ) ) . append ( "<ul class='dropdown-menu'>" + "<li class='inlinemenu-header'>" + "<a>" + menuText + "</a>" + "</li>" + "</ul>" ) ; this . _keydownHook = this . _keydownHook . bind ( this ) ; }
Displays a popup list of items for a given editor context

@constructor
@param {Editor} editor
@param {string} menuText
Displays a popup list of items for a given editor context