[]
The core advantage of SpreadJS Designer's Command Palette is its ability to significantly enhance operational efficiency. Instead of navigating through multi-layered menus, users can simply invoke the panel with a shortcut (Ctrl/Cmd+P), enter a keyword (such as "merge cells" or "data validation"), and execute commands instantly, reducing steps and saving time.
This feature is particularly valuable for high-frequency, complex tasks like formula editing and batch styling. By enabling keyboard-driven navigation and intelligent search, it minimizes distractions from interface switching, allowing users to focus on core workflows and accelerate spreadsheet design and data processing.
The Command Palette is integrated into the designer's layout via GC.Spread.Sheets.Designer.DefaultConfig
. It is registered as a pop-up side panel in the configuration:
GC.Spread.Sheets.Designer.DefaultConfig = {
// ...
sidePanels: [
// ...
{
/**
* Displays the panel as a popup modal.
*/
position: 'popup',
command: GC.Spread.Sheets.Designer.CommandNames.CommandPalettePanel,
uiTemplate: GC.Spread.Sheets.Designer.TemplateNames.CommandPaletteTemplate,
}
]
};
Ctrl/Cmd + P
)Press Ctrl + P
(Windows) or Cmd + P
(Mac) to open the Command Palette instantly.
The Command Palette can also be accessed from the View tab in the Ribbon.
Search Field: Enter keywords to filter commands (searches title
, text
, tip
, and name
).
Keyboard Navigation
Shortcut | Action |
---|---|
Up / Down Arrow | Move selection up/down |
Enter | Execute the selected command |
Esc |
|
Backspace | Remove search tags |
The Command Palette searches:
All ribbon commands
Hidden commands (e.g., GC.Spread.Sheets.Designer.CommandNames.Background
)
Custom commands defined in GC.Spread.Sheets.DefaultConfig.commandMap