Components

Rich Text

This renders a WYSIWYG text editor. Outputs HTML.

Usage

const blogPostHtml = await io.input.richText('Create a rich blog post')
console.log(blogPostHtml) // <p>Cool blog post</p>

Parameters

labelrequired
string

The label to render above the input.

options { ... }
defaultValue
string

Default value rendered in input. Default '<p></p>'.

placeholder
string

The placeholder to render within the input. Default undefined.

customValidator
(input: unknown) => Promise<string | true>

An asynchronous function that takes unknown input and outputs either true or an error message string to show the user.