-
Main
- Dashboard No active orders
- Layouts
- Themes
- Starter kit
- Changelog2.0
- RTL version
-
Forms
- Form components
- JSON forms
- Text editors
- Pickers
- Form layouts
-
Components
- Basic components
- Content styling
- Extra components
- Color system
- Animations
- Icons
-
Layout
- Page layouts
- Sidebars
- Navbars
- Vertical navigation
- Horizontal navigation
- Menu levels
-
Data visualization
- Echarts library
- D3 library
- Dimple library
- C3 library
- Google charts
- Maps integration
-
Extensions
- Extensions
- JQuery UI
- File uploaders
- Event calendars
- Internationalization
-
Tables
- Basic tables
- Data tables
- Data tables extensions
- Handsontable
- Responsive tables
-
Page kits
- General pages
- Service pages
- User pages
- Application pages
- Widgets
The following example demonstrates a basic setup of content menu. To run the basic configuration, just set the contextMenu
option to true
. When the context menu for the row header is opened, the column options are disabled. Likewise, when the context menu for the column header is opened, the row options are disabled.
You can limit options available in the context menu using contextMenu
option as an array of strings: row_above
- insert row above; row_below
- insert row below; col_left
- insert column on the left; col_right
- insert column on the right; remove_row
- remove row; remove_col
- remove column; undo
- undo action; redo
- redo action; make_read_only
- read only; alignment
- submenu with alignment options. For separator use '---------'
string.
The following example demonstrates custom context menu configuration. For greatest configurability, you use contextMenu
option as a configuration object as described in jQuery contextMenu documentation. This example shows how to set custom text, how to disable "Remove row"and "Insert row above"for the first row and how to add your own option.
Copy and Paste feature are available in Handsontable by default, but only as key shortcuts (Ctrl (Cmd) + Cand Ctrl (Cmd) + Vrespectively). This plugin makes them available also as a clickable options in the context menu. Unfortunately, due to the browser's security restrictions, Handsontable is forced to use a third-party SheetCliplibrary - a tiny library that transforms JavaScript 2-dimensional arrays to clipboard strings compatible with spreadsheets such as Microsoft Excel, Google Docs, LibreOffice and OpenOffice.