An open source design system that's fully customizable and agent ready
TypeScript
docs(storybook): fix RichTextEditor @example that breaks autodocs (#4542)
Joeyaf7954b1ee64
diff --git a/packages/lab/src/RichTextEditor/RichTextEditor.tsx b/packages/lab/src/RichTextEditor/RichTextEditor.tsxindex 4745442947..48b9fdb902 100644--- a/packages/lab/src/RichTextEditor/RichTextEditor.tsx+++ b/packages/lab/src/RichTextEditor/RichTextEditor.tsx@@ -372,10 +372,12 @@ export interface RichTextEditorProps extends Omit<* `plugins` to layer richer behaviour (toolbars, mentions, hover cards) on top* without forking.*+ * The forwarded `RichTextEditorRef` exposes imperative `focus()` and `clear()`+ * methods for callers that manage the editor from outside.+ ** @example* ```* import {RichTextEditor, type RichTextEditorRef} from '@astryxdesign/lab';- ** const ref = useRef<RichTextEditorRef>(null);* <RichTextEditor* ref={ref}@@ -383,7 +385,6 @@ export interface RichTextEditorProps extends Omit<* placeholder="Write something..."* onChange={state => save(JSON.stringify(state.toJSON()))}* />- * // Later: ref.current?.focus(); ref.current?.clear();* ```*/export const RichTextEditor = forwardRef<