RichTextLabel

See source code
Table of contents

Renders a text label that can be used inside of shapes. The component has the ability to be edited in place and furthermore supports rich text editing.


Properties

align


bounds

optional
bounds?: Box;

classNamePrefix

optional
classNamePrefix?: string;

fill

optional
fill?: TLDefaultFillStyle;

font


fontSize

fontSize: number;

hasCustomTabBehavior

optional
hasCustomTabBehavior?: boolean;

isSelected

isSelected: boolean;

labelColor

labelColor: string;

lineHeight

lineHeight: number;

onKeyDown

optional

Parameters

NameDescription

e

KeyboardEvent;

Returns

void;

padding

optional
padding?: number;

richText

optional
richText?: TLRichText;

shapeId

shapeId: TLShapeId;

showTextOutline

optional
showTextOutline?: boolean;

style

optional
style?: React.CSSProperties;

textHeight

optional
textHeight?: number;

textWidth

optional
textWidth?: number;

type

type: ExtractShapeByProps<{
  richText: TLRichText;
}>["type"];

verticalAlign

verticalAlign: TLDefaultVerticalAlignStyle;

wrap

optional
wrap?: boolean;

Prev
RichTextArea
Next
RichTextSVG