Skip to content

Latest commit

 

History

History
87 lines (51 loc) · 1.88 KB

RichTextareaProps.md

File metadata and controls

87 lines (51 loc) · 1.88 KB

APIDocs


Interface: RichTextareaProps

Props of RichTextarea.

For other props not mentioned below will be passed to textarea.

Extends

  • Omit<JSX.IntrinsicElements["textarea"], "children">

Properties

children?

optional children: Renderer

Render function to create customized view from value.

This function should return ReactNodes which texts are positioned the same as textarea (see examples for detailed usage).

On the rendered nodes, currently limited event handlers will work.

  • onClick
  • onMouseOver
  • onMouseOut
  • onMouseMove
  • onMouseDown
  • onMouseUp

Default Value

undefined

Defined in

src/textarea.tsx:110


autoHeight?

optional autoHeight: boolean

If true, textarea height is automatically resized and height of style prop does not work. Set maxHeight to style prop if you need limit. Set rows prop to 1 if you need single-line textarea.

Default Value

undefined

Defined in

src/textarea.tsx:117


onSelectionChange()?

optional onSelectionChange: (pos) => void

Called when selection in textarea changes. It gives position of caret at the time, which is useful to position menu.

Parameters

pos: CaretPosition

Returns

void

Default Value

undefined

Defined in

src/textarea.tsx:122