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 🙏

© 2026 – Pkg Stats / Ryan Hefner

btfly-ueditor

v1.0.0

Published

基于[email protected]富文本编辑器

Readme

Get Started

ueditor 富文本编辑器介绍

UEditor 是由百度 web 前端研发部开发所见即所得富文本 web 编辑器,具有轻量,可定制,注重用户体验等特点,开源基于 MIT 协议,允许自由使用和修改代码。

btfly-ueditor 开发

yarn build

入门部署和体验

第一步:下载编辑器

到官网下载 ueditor 最新版:[官网地址]

第二步:创建 demo 文件

解压下载的包,在解压后的目录创建 demo.html 文件,填入下面的 html 代码

<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="UTF-8" />
    <title>ueditor demo</title>
  </head>
  <body>
    <!-- 加载编辑器的容器 -->
    <script id="container" name="content" type="text/plain">
      这里写你的初始化内容
    </script>
    <!-- 配置文件 -->
    <script type="text/javascript" src="ueditor.config.js"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" src="ueditor.all.js"></script>
    <!-- 实例化编辑器 -->
    <script type="text/javascript">
      var ue = UE.getEditor("container");
    </script>
  </body>
</html>

第三步:在浏览器打开 demo.html

如果看到了下面这样的编辑器,恭喜你,初次部署成功!

部署成功

自定义的参数

编辑器有很多可自定义的参数项,在实例化的时候可以传入给编辑器:

var ue = UE.getEditor("container", {
  autoHeight: false,
});

配置项也可以通过 ueditor.config.js 文件修改,具体的配置方法请看[前端配置项说明](http://fex.baidu.com/ueditor/#start-config1.4 前端配置项说明.md)

设置和读取编辑器的内容

通 getContent 和 setContent 方法可以设置和读取编辑器的内容

var ue = UE.getContent();
ue.ready(function () {
  //设置编辑器的内容
  ue.setContent("hello");
  //获取html内容,返回: <p>hello</p>
  var html = ue.getContent();
  //获取纯文本内容,返回: hello
  var txt = ue.getContentTxt();
});

ueditor 的更多 API 请看API 文档

相关链接

ueditor 官网:http://ueditor.baidu.com

ueditor API 文档:http://ueditor.baidu.com/doc

ueditor github 地址:http://github.com/fex-team/ueditor

详细文档

ueditor 文档:http://fex.baidu.com/ueditor/

联系我们

email:[email protected] issue:github issue