The text a drawing carries, and how it is set. The text tool is this box; a shape (rectangle, channel, callout) carries one as its label.

Kept apart from DrawingStyle because the two answer different questions: style is how the outline is stroked, text is what the label says and how it is typeset. A purple rectangle with white bold text is one shape with two colours, and a settings panel wants them on different tabs.

interface DrawingText {
    align?: "center" | "left" | "right";
    background?: boolean;
    backgroundColor?: string;
    backgroundOpacity?: number;
    bold?: boolean;
    border?: boolean;
    borderColor?: string;
    color?: string;
    fontFamily?: string;
    fontSize?: number;
    italic?: boolean;
    position?: "inside" | "outside";
    valign?: "bottom" | "middle" | "top";
    value: string;
    wrap?: boolean;
    wrapWidth?: number;
}

Properties

align?: "center" | "left" | "right"

Horizontal alignment within the box. Default 'left'.

background?: boolean

Draw a filled plate behind the text.

backgroundColor?: string
backgroundOpacity?: number

Plate opacity, 0..1. Default 1: a text background is usually opaque.

bold?: boolean
border?: boolean

Stroke a border around the plate.

borderColor?: string
color?: string

Falls back to style.color.

fontFamily?: string

CSS font stack. Defaults to the UI sans-serif stack.

fontSize?: number

Media px. Default 12.

italic?: boolean
position?: "inside" | "outside"

Where a shape's label sits relative to the shape: inside the outline, or outside just above it. Shapes only; the text tool is its own box.

valign?: "bottom" | "middle" | "top"

Vertical placement within the box. Default 'top'.

value: string

Body text. \n starts a new line; see wrap for soft wrapping.

wrap?: boolean

Soft-wrap at wrapWidth instead of running off the pane.

wrapWidth?: number

Wrap width in media px. Default 220.