@mocanvas/mocanvas · interface

PlainTextLabelProps

interface PlainTextLabelProps

Shape labels, in the three forms a shape needs them.

The DOM label (PlainTextLabel / RichTextLabel) is what a shape body renders; RichTextSVG is what the exporter renders, and it has to produce real <text> elements rather than a foreignObject, because a foreignObject is not rendered by most SVG consumers — including the rasteriser in several browsers.


Methods · 1

onChange(text: string): void

Properties · 14

color: string
fontFamily?: DefaultFontStyle
fontSize: number
height?: number
isEditing: boolean
padding?: number
placeholder?: string
shape: UnknownShape
singleLine?: boolean
text: string
textAlign?: DefaultHorizontalAlignStyle
verticalAlign: DefaultVerticalAlignStyle
width?: number
wrap: boolean

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.