import { whisper } from "@oliveai/ldk"
} from "@oliveai/ldk/dist/whisper"
const validateInputLength = ((string: string) => {
if (string.length > 100 ) {
return "Text Must be Less Than 100 Characters";
const richTextExampleConfig = ( (value: string, validationError: string): NewWhisper | UpdateWhisper => {
label: 'Rich Text Editor Example',
type: WhisperComponentType.RichTextEditor,
onBlur: (error: Error | undefined) => {
if (validationError === undefined) {
label: "Rich Text Editor Input",
type: WhisperComponentType.Markdown,
onChange: (error: Error, param: string, whisper: Whisper) => {
whisper.update(richTextExampleConfig(param, validateInputLength(param)))
onFocus:(error: Error | undefined) => {
tooltip: "Input text: 100 characters max",
validationError: validationError,
const newRichTextExampleConfig = (async () => {
await whisper.create(richTextExampleConfig('', undefined) as NewWhisper);
newRichTextExampleConfig();