vyaz-monorepo / core/src / InlineWidget
Interface: InlineWidget
Defined in: core/src/types/Document.ts:353
Data for an inline widget (embedded object inside text flow).
Inline widgets behave like a single character glyph with a fixed width and height. They sit on the baseline by default.
Example
An inline icon (24×24 px) embedded in a sentence:
{ width: 24, height: 24, baselineOffset: 0 }Properties
baselineOffset?
optionalbaselineOffset?:number
Defined in: core/src/types/Document.ts:363
Offset from the baseline (in px). Positive = widget descends below the baseline. Negative = widget ascends above the baseline.
height
height:
number
Defined in: core/src/types/Document.ts:357
Height of the widget in px.
id?
optionalid?:string
Defined in: core/src/types/Document.ts:369
Opaque key a renderer can use to look up the widget's actual content (e.g. renderToSVG's inlineBoxes[id] SVG fragment). The layout engine only reserves the width × height box; it never reads this.
width
width:
number
Defined in: core/src/types/Document.ts:355
Width of the widget in px.
