'use client' import * as React from 'react' import { TextBlock as TextBlockType } from '../types' interface TextBlockProps { block: TextBlockType onChange: (block: TextBlockType) => void isEditing?: boolean /** Optional custom rich text editor component. Receives content, onChange, placeholder, and className. */ renderEditor?: (props: { content: string onChange: (html: string) => void placeholder?: string className?: string }) => React.ReactNode } export function TextBlockEditor({ block, onChange, isEditing = true, renderEditor }: TextBlockProps) { if (!isEditing) { return (