TidalUI

Rich text editor preview

Author controlled formatted content with constrained native editing and JSON serialization.

pro · Forms · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/rich-text-editor

Import components/ui/tidal.css, components/ui/rich-text-editor.css. Wrap installed components in tidal-scope.

Preview

Rich text editor component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/rich-text-editor.css";
import{TidalRichTextEditor}from"./components/ui/rich-text-editor";
export default()=><div className="tidal-scope"><TidalRichTextEditor label={"Demo"} onValueChange={() => {}} value={"value"}/></div>;

API and props

TidalRichTextEditor.label (required)
ReactNode

Required label value accepted by this exported component.

TidalRichTextEditor.onValueChange (required)
(value: string, editor: LexicalEditor) => void

Callback invoked when the value change interaction is proposed.

TidalRichTextEditor.value (required)
string

Required value value accepted by this exported component.

TidalRichTextEditor.commandButtonProps
Partial<Record<TidalRichTextCommand, CommandButtonProps>> | undefined

Optional command button props value accepted by this exported component.

TidalRichTextEditor.commandButtonRefs
Partial<Record<TidalRichTextCommand, Ref<HTMLButtonElement>>> | undefined

Optional command button refs value accepted by this exported component.

TidalRichTextEditor.contentEditableProps
EditableProps | undefined

Optional content editable props value accepted by this exported component.

TidalRichTextEditor.contentEditableRef
Ref<HTMLDivElement> | undefined

Optional content editable ref value accepted by this exported component.

TidalRichTextEditor.description
ReactNode

Optional description value accepted by this exported component.

TidalRichTextEditor.dir
"ltr" | "rtl" | undefined

Optional dir value accepted by this exported component.

TidalRichTextEditor.disabled
boolean | undefined

Optional disabled value accepted by this exported component.

TidalRichTextEditor.editorRef
Ref<LexicalEditor> | undefined

Optional editor ref value accepted by this exported component.

TidalRichTextEditor.error
ReactNode

Optional error value accepted by this exported component.

TidalRichTextEditor.form
string | undefined

Optional form value accepted by this exported component.

TidalRichTextEditor.hiddenInputProps
HiddenInputProps | undefined

Optional hidden input props value accepted by this exported component.

TidalRichTextEditor.hiddenInputRef
Ref<HTMLInputElement> | undefined

Optional hidden input ref value accepted by this exported component.

TidalRichTextEditor.labels
TidalRichTextEditorLabels | undefined

Optional labels value accepted by this exported component.

TidalRichTextEditor.linkHref
string | null | undefined

Optional link href value accepted by this exported component.

TidalRichTextEditor.name
string | undefined

Optional name value accepted by this exported component.

TidalRichTextEditor.onPaste
((event: ClipboardEvent) => void) | undefined

Callback invoked when the paste interaction is proposed.

TidalRichTextEditor.placeholder
ReactNode

Optional placeholder value accepted by this exported component.

TidalRichTextEditor.portalContainer
HTMLElement | null | undefined

Optional portal container value accepted by this exported component.

TidalRichTextEditor.readOnly
boolean | undefined

Optional read only value accepted by this exported component.

TidalRichTextEditor.theme
"light" | "dark" | undefined

Optional theme value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas