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 的富文本编辑器组件)
- Host: GitHub
- URL: https://github.com/twp0217/react-wangeditor
- Owner: twp0217
- Created: 2021-09-19T11:47:59.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-09-22T12:59:13.000Z (about 4 years ago)
- Last Synced: 2025-02-12T10:18:15.837Z (8 months ago)
- Topics: react, react-wangeditor, wangeditor
- Language: TypeScript
- Homepage: https://twp0217.github.io/react-wangEditor/
- Size: 1.56 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
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,欢迎讨论。