Skip to main content
Version: 1.x.x

RichTextBox

Properties

record

required

quip.apps.RichTextRecord

The RichTextRecord object containing the data for this RichTextBox.

scrollable

optional

boolean = false

Controls whether the RichTextBox will allow vertical scrolling once the contents have grown larger than the maxHeight. By default, the extra content tighter is hidden

width

optional

(number | string) = 300

Width (px) for the RichTextBox. Can also be a string like "100%".

minHeight

optional

(number | string) = 20

Minimum height (px) for the RichTextBox regardless of its contents Can also be a string like "100%".

maxHeight

optional

(number | string) = 300

Maximum height (px) for the RichTextBox. If its contents grow past this height, the RichTextBox may become scrollable depending on the scrollable prop Can also be a string like "100%".

disableInlineMenus

optional

boolean = false

Controls whether the default inline format menu and link inspector are shown

disableAutocomplete

optional

boolean = false

Controls whether autocomplete is enabled in the RichTextBox

onComponentHeightChanged

optional

Function(height: number) => void

Callback for when the height of this RichTextBox has changed

useDocumentTheme

optional

boolean = false

Whether the contents of the RichTextBox should be rendered using the host document theme. If this is false, contents are rendered in Lightning theme

allowedStyles

optional

quip.apps.RichTextRecord.Style[]

If specified, this provides an exact list of the formatting styles that will be permitted to be created in this RichTextBox and will supersede any additional allow props specified.

allowImages

optional

boolean = true

Whether this RichTextBox allows insertion of images

allowLists

optional

boolean = true

Whether this RichTextBox allows insertion of lists

allowHeadings

optional

boolean = false

Whether this RichTextBox allows heading font styles

allowSpecialTextStyles

optional

boolean = false

Whether this RichTextBox allows text styles like Code Block, Blockquote or Pull Quote

allowHorizontalRules

optional

boolean = false

Whether this RichTextBox allows insertion of horizontal rules

maxListIndentationLevel

optional

number

Sets a max indentation level for lists contained in this RichTextBox

readOnly

optional

boolean = false

Whether this RichTextBox should be rendered in read-only mode

onFocus

optional

Function() => void

Callback for when this RichTextBox gains focus

onBlur

optional

Function() => void

Callback for when this RichTextBox loses focus

handleKeyEvent

optional

Function(e: Event) => void

Callback for keyboard events when this RichTextBox is focused. If handleKeyEvent returns true, the event is not passed to the RichTextBox to be processed

allowDefaultTabNavigation

optional

boolean = false

Determines whether the RichTextBox allows default browser tab navigation. If you provided a handleKeyEvent, it must return a value of false for the RichTextBox property to take effect.

color

optional

(string | keyof quip.apps.ui.ColorMap)

Controls the color of the text and the cursor

quip.apps.ui.RichTextBox.prototype

insertText

Function(text: string) => void

Inserts the given text at the end of this textbox.

selectAll

Function() => void

Selects all text in this textbox.

focus

Function() => void

Focuses this textbox.