// AUTO-GENERATED by scripts/generate-wrappers.mjs — do not edit by hand. // Source: packages/core/manifest.json (component "rich-text-editor"). import type { ElementType, ReactNode } from 'react'; import { RichTextEditor as RichTextEditorController, type RichTextEditorOptions } from '@42/core/rich-text-editor'; import { C42 } from '../C42'; const DEFAULT_HTML: string | null = "
\n \n \n \n \n
\n
"; export interface RichTextEditorProps extends Partial { /** Element/tag rendered as the controller root. Defaults to `"div"`. */ as?: ElementType; className?: string; children?: ReactNode; /** Fired on `richtexteditor:command` — detail: `{ command, value? }` */ onCommand?: (detail: unknown, event: CustomEvent) => void; /** Fired on `richtexteditor:change` — detail: `{ html }` */ onChange?: (detail: unknown, event: CustomEvent) => void; /** Extra props are forwarded to the rendered `
` element. */ [key: string]: unknown; } export function RichTextEditor(props: RichTextEditorProps) { const { as, className, children, onCommand, onChange, value, getLinkUrl, ...rest } = props; const options = { value, getLinkUrl } as RichTextEditorOptions; return ( {children as ReactNode} ); }