npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mailzwj/r-editor

v1.0.5

Published

一个基于React的消息编辑器插件,包含Mention、表情、粘贴图片等功能。

Downloads

20

Readme

REACT消息编辑器

预览

REditor

在线预览

安装

npm install --save @mailzwj/r-editor

使用方法

  • ES6 Module
import REditor from '@mailzwj/r-editor';

<REditor 
    value="Enter键换行,Ctrl/Command+Enter键获取内容"
    mentionList={mentionList}
    finishKey="CtrlOrCmd+Enter"
    onFinish={this.getEditorContent} />

props

  • value<String>: 编辑器初始化默认内容
  • mentionList<Array>: 提到联系人列表,不传则不启用提到功能。元素为包含pinnickName字段的对象,详见demo
  • finishKey<String>: 触发输入完成的快捷键:Enter/Ctrl+Enter/Cmd+Enter/CtrlOrCmd+Enter,默认Enter
  • onFinish<Function>: 接收编辑器中内容的函数,触发finishKey的时候调用
  • emojiList<Array>: 自定义表情列表,不传则使用默认表情。元素为包含titletitle_cnurl的对象,详见demo

实例方法

  • getHtml(): 返回编辑器内部的HTML代码
  • getJson(): 以JSON格式返回编辑器内部的数据,rows数组存储每行的数据

功能列表

  • [x] 文本输入
  • [x] 表情输入
  • [x] 粘贴内容(内容去格式)
  • [x] 粘贴图片文件
  • [x] 粘贴截图
  • [x] 点选图片或提到块
  • [x] 查看大图(双击编辑器中的图片)
  • [ ] 提到组件自定义
  • [ ] 表情组件自定义
  • [ ] 序列化内容
  • [ ] 其他