Note kit command

table.create

Insert a table

Inserts a new table of `columns` columns (with optional header cells and `rows` empty body rows) before a line, at a section position, or at the end of the note, and answers its table index.

Kit
Note 0.3.0 (Markdown (.md))
Changes the document
yes

Parameters

Parameters of table.create
NameTypeRequiredDescription
columnsinteger (≥ 1, ≤ 64)yesHow many columns.
headerstring[]noThe header cells.
headingstring[]noOr a heading's path, with position.
lineintegernoInsert before this line, from 1.
position"before" | "after" | "start" | "end"noWhere, relative to the heading's section; end by default.
rowsintegernoHow many empty body rows (default 1).

Call through note_run

text
note_run {
  "path": "<file>.md",
  "steps": [{ "command": "table.create", "params": { "columns": <integer> } }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: header, heading, line, position, rows. note_run answers the step’s result in completed[i].result.

Result

Result of table.create
NameTypeRequiredDescription
changedbooleanyesWhether the note's text changed.
tableintegeryesThe new table's index, from 0.
Result JSON Schema
json
{
  "additionalProperties": false,
  "properties": {
    "changed": {
      "description": "Whether the note's text changed.",
      "type": "boolean"
    },
    "table": {
      "description": "The new table's index, from 0.",
      "type": "integer"
    }
  },
  "required": [
    "changed",
    "table"
  ],
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "columns": {
      "description": "How many columns.",
      "maximum": 64,
      "minimum": 1,
      "type": "integer"
    },
    "header": {
      "description": "The header cells.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "heading": {
      "description": "Or a heading's path, with position.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "line": {
      "description": "Insert before this line, from 1.",
      "type": "integer"
    },
    "position": {
      "description": "Where, relative to the heading's section; end by default.",
      "enum": [
        "before",
        "after",
        "start",
        "end"
      ],
      "type": "string"
    },
    "rows": {
      "description": "How many empty body rows (default 1).",
      "type": "integer"
    }
  },
  "required": [
    "columns"
  ],
  "type": "object"
}

Generated from kition-sdk packages/script/kits/note.ts and the kit itself (kition-note@69e14d9). As data: commands.jsonl.