import { Editor } from '@hanzo/ui'
An empty rich-text surface with the formatting toolbar.
export function Default() {return <Editor placeholder="Start typing..." />}
The value and its updates are owned by the caller.
export function Controlled() {return (<YStack gap="$2"><Editor value="<p>Edit me and watch <b>onChange</b> fire.</p>" onChange={() => {}} /></YStack>)}
The surface renders content without accepting edits.
export function ReadOnly() {return <Editor readOnly value="<p>This note is locked.</p>" />}
export type EditorCommand = 'bold' | 'italic' | 'insertUnorderedList' | 'insertOrderedList'
export interface EditorProps extends Omit<YStackProps, 'children' | 'onChange'> {/** A controlled value; omit it and edit freely to let the surface own its HTML. */value?: stringonChange?: (value: string) => voidplaceholder?: stringreadOnly?: boolean}