# 显示可编辑区域 {#react-components}

Source: [显示可编辑区域 | Yurich React 编辑器 API 参考 · Yurich](https://leeyujoo.com/yurich/zh-cn/api/react-components/)

Package: [`yurich`](https://www.npmjs.com/package/yurich)

Package version: `0.1.2`

把 `EditorContent` 放在 `EditorProvider` 里面。后代使用 `useEditorContext()` 取得实例。`className` 设置样式类，`ariaLabel` 命名输入区，`ariaDescribedBy` 指向说明元素 ID。使用同一实例重新挂载时，内容和历史记录会保留。编辑器禁用拖放。

```tsx
import { Bold, EditorContent, EditorProvider, useEditor } from 'yurich';

export function ArticleEditor() {
  const editor = useEditor({ extensions: [Bold] });

  return (
    <EditorProvider editor={editor}>
      <EditorContent ariaLabel="Article" />
    </EditorProvider>
  );
}
```

[快速开始](https://leeyujoo.com/yurich/zh-cn/#quick-start)
