SpreadJS Documentation
createMenuItemElement Method
GC.Spread.Sheets.ContextMenu Namespace > MenuView type : createMenuItemElement Method
create menuitem view
Syntax
var instance = new GC.Spread.Sheets.ContextMenu.MenuView();
var value; // Type: HTMLElement
value = instance.createMenuItemElement(menuItemData);
function createMenuItemElement( 
   menuItemData : GC.Spread.Sheets.ContextMenu.IMenuItemData
) : HTMLElement;

Parameters

menuItemData
the data of the menu item which needs to be shown
Example
$(document).ready(function () {
   var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
   function CustomMenuView() {
  }
  CustomMenuView.prototype = new GC.Spread.Sheets.ContextMenu.MenuView();
  CustomMenuView.prototype.createMenuItemElement = function (menuItemData) {
     var self = this;
     var menuItemView = GC.Spread.Sheets.ContextMenu.MenuView.prototype.createMenuItemElement.call(self, menuItemData);
     if (menuItemData.name === "markWithABg") {
         var subMenuView = menuItemView.find(".gc-ui-contextmenu-container");
         $(subMenuView[0]).colorpicker();
     }
     return menuItemView;
 };
});
See Also

Reference

MenuView type