An open API service indexing awesome lists of open source software.

https://github.com/twp0217/react-wangeditor

wangEditor component for React(基于 React 的富文本编辑器组件)
https://github.com/twp0217/react-wangeditor

react react-wangeditor wangeditor

Last synced: 7 months ago
JSON representation

wangEditor component for React(基于 React 的富文本编辑器组件)

Awesome Lists containing this project

README

          

# react-wangEditor

wangEditor component for React(基于 React 的富文本编辑器组件)

## 安装

```bash
npm install @twp0217/react-wangeditor
```

## 使用

```typescript
import React from 'react';
import WangEditor from '@twp0217/react-wangeditor';

export default () => {
return ;
};
```

## API

### WangEditorConfig

> 编辑器配置:[官方文档](https://www.wangeditor.com/doc/)

### WangEditorProps

| 名称 | 类型 | 默认值 | 说明 |
| ------------ | ----------------------- | ------- | ---------------- |
| config | WangEditorConfig | - | 编辑器配置 |
| placeholder | string | - | 输入框提示 |
| disabled | boolean | `false` | 是否禁用 |
| autoFocus | boolean | `false` | 自动获取焦点 |
| defaultValue | string | - | 编辑器默认内容 |
| value | string | - | 编辑器内容 |
| onChange | (value: string) => void | - | 内容变化时的回调 |
| onFocus | (value: string) => void | - | 获得焦点时的回调 |
| onBlur | (value: string) => void | - | 失去焦点时的回调 |

## 支持

- 如果项目对你有帮助,请点颗星星:star:,谢谢。
- 如果你对项目有想法、问题、BUG,欢迎讨论。