fish-bubble-chat-editor
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

fish-bubble-chat-editor - 一个基于React的聊天富文本组件

安装

 # NPM
$ npm install fish-bubble-chat-editor
# Yarn
$ yarn add fish-bubble-chat-editor
# pnpm
$ pnpm install fish-bubble-chat-editor

使用

// main.tsx
import "fish-bubble-chat-editor/dist/index.css";
import FbChatEditor from "fish-bubble-chat-editor";

<FbChatEditor />;

API

Editor props

参数 说明 类型 默认值
placeholder 提示占位符 string ——
className 扩展类名 string ——
toolbarRender 自定义工具栏内容 () => ReactNode ——
onSend 点击发送按钮事件 () => ReactNode ——
onEnterDown 键盘回车事件 Function ——
onChange 输入框内容变化时 Function ——

Editor Methods

名称 说明 类型
getValue 获取输入框值 () => string
setValue 设置输入框值 (val: string) => void
clear 清空输入框值 () => void
focus 获取焦点 () => void
blur 失去焦点 () => void

Package Sidebar

Install

npm i fish-bubble-chat-editor

Weekly Downloads

11

Version

0.0.5

License

MIT

Unpacked Size

278 kB

Total Files

45

Last publish

Collaborators

  • raypeng