- SpreadJS Overview
- Getting Started
- JavaScript Frameworks
- Best Practices
- Features
- SpreadJS Designer
-
SpreadJS Designer Component
- Getting Started
- Quick Start
- Theme
- Designer Interface
- JavaScript Frameworks
-
Customizations
- Add a Tab
- Add Elements to a Tab
- Set Active Ribbon Tab
- Enable/Disable Ribbon Elements
- Create/Customize Page Themes
- Add Context Menu Item
- Add New Dialog
- Bind File Import Events
- Customize Status Bar
- Add a Custom Component
- Customize Designer Localization
- Customize File Menu
- Customize Format Culture Dialog
- Customize Save File Dialog
- Work in Designer Component
- Toolbar Ribbon
- API Documentation
- SpreadJS Collaboration Server
- Touch Support
- Formula Reference
- Import and Export Reference
- Frequently Used Events
- API Documentation
- Release Notes
(Showing Draft Content)
Add Context Menu Item
Follow the below steps to add the 'Insert Signature' option in the context menu component.
Access the default configuration.
// Access the default config var config = GC.Spread.Sheets.Designer.DefaultConfig;Add the "Insert Signature" option in the
contextMenutag and set it into commandMap in your project.// Add context menu item in config context menu if (config && config.contextMenu) { config.contextMenu.unshift("insertSignatureMenu"); } // Create command for the new context menu item config.commandMap = { "insertSignatureMenu": { text: "Insert Signature", commandName: "insertSignatureMenu", visibleContext: "ClickRowHeader", // execute InsertSignature, following just a simple demo code snippet execute: () => { console.log("Insert Signature"); } } }Initialize the designer instance by passing the
configparameter for customizable configuration.// Initialize the designer instance var designer = new GC.Spread.Sheets.Designer.Designer("designerHost", config);
The below output will be generated:
image