Multi-line, color and week editors
Since 1.5.0
cellEditor: 'textarea', cellEditor: 'color' and kind: 'week' are available since 1.5.0.
All three work on columns with editable: true. textarea and color need the optional editors bundle (maxgrid/editors in modular builds; the all-in-one bundle includes it). Without the bundle, creating the grid fails with invalid-option. week is in the base bundle like month.
Multi-line editor (textarea)
Type long text over several lines. The value is a string with lines joined by \n.
{ id: 'memo', editable: true, cellEditor: 'textarea',
editorParams: { rows: 5, maxLength: 200, resize: true } }| Option | Value | Default | Meaning |
|---|---|---|---|
rows | integer 1–12 | 4 | Lines of the edit box |
maxLength | 1–10000 | none | Characters that can be typed |
resize | boolean | false | Let the edit box grow vertically |
placeholder | string | none | Hint shown while empty |
| Key or action | Result |
|---|---|
| Enter, Shift+Enter | Line break (does not confirm) |
| Ctrl+Enter (⌘+Enter on Mac) | Confirm |
| Esc | Cancel (keeps the old value) |
| Tab, clicking another cell | Confirm |
| While composing (IME) | Keys are left alone; confirms after composing |
- Cell display: only the first line and
…. Withwrap: trueon the column the line breaks show as they are, and withrowHeight: 'auto'the row grows. - Copy and export: the full text with line breaks is used.
- Validation:
maxLength,requiredandcustomofvalidationapply. On failure the editor stays open and says why.
Color editor (color)
Opens a swatch grid and a hex input. The value is a lowercase #rrggbb (#rrggbbaa with alpha: true). The browser's own <input type="color"> is not used.
{ id: 'color', editable: true, cellEditor: 'color',
editorParams: { swatches: ['#1a73e8', '#188038', '#d93025'], alpha: false } }| Option | Value | Default | Meaning |
|---|---|---|---|
swatches | 1–64 hex color strings | default 16 | Swatch list. With alpha off, 8-digit colors are dropped |
alpha | boolean | false | Allow #rrggbbaa |
| Key or action | Result |
|---|---|
| Arrow keys | Move over swatches (stops at the ends); the input shows the color |
| Enter | Confirm the picked swatch or the typed text |
| Typing | The preview dot updates live; #abc expands to #aabbcc |
| Clicking a swatch | Confirm that color |
| Esc | Cancel (keeps the old value) |
- Validation: a wrong format keeps the editor open with "Enter a color as #rrggbb". An empty value clears to
null. - Cell display: a small swatch and the hex text.
- Paste: only
#rgband#rrggbbare accepted (text such asrgb()is rejected) and lowercased.
Week kind and editor (kind: 'week')
A column that picks an ISO 8601 week. Weeks start on Monday and the week with the first Thursday is week 1. The value is a string without a time zone, YYYY-Www (for example 2026-W47). Around New Year the year can differ from the calendar year (2024-12-30 is 2025-W01).
{ id: 'sprint', title: 'Sprint week', kind: 'week', editable: true,
dateTime: { min: '2026-W10', max: '2026-W40' } }| Item | Behavior |
|---|---|
| Open picker | One row of the day grid is one week. Hover, selection and cursor cover the row; the week-number column is always shown |
| Pick a week | Clicking any day in a row confirms that week as YYYY-Www |
| Arrow keys | Move one week (← ↑ earlier, → ↓ later) |
| PageUp, PageDown | Move one month |
| Home, End | First and last week of the year (week 53 in years that have it) |
| Typing | YYYY-Www, YYYYWww, YYYY-ww. A week that does not exist (2025-W53) is rejected |
dateTime.min/max | YYYY-Www. Weeks outside the range are disabled as a whole row |
dateTime.weekStart | Ignored (always Monday) |
| Display pattern | Default YYYY-Www. format.date.pattern can use only GGGG (ISO year) and WW (ISO week) |
Stored format (stored) | Not available |
- Sort, group, filter: the same week is the same value. A
Datevalue is read as the week of its day. Filter cells accept>=2026-W10and2026-W01..2026-W26. - Copy and paste: the typing formats above are accepted; wrong text is rejected with a reason.
- Export: CSV, JSON and PDF use the
YYYY-Wwwtext. xlsx also writes a text cell, not a date cell. CSV import reads loose formats asYYYY-Www.