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

etherpad-vue

v1.6.0

Published

this is a plug-in for etherpad in vue

Readme

下载安装

npm install --save etherpad-vue

或

cnpm install --save etherpad-vue

功能描述

​ 此版本基于github上开源项目etherpad进行vue组件的封装,主要实现功能配置,内容获取等功能

配置说明

config: {
  ETHERPAD_APIKEY: 'asdgsfg',  // API密钥,在node服务根目录下APIKEY.txt  必选
  id: 'toke',  // 文档ID  必选
  host: 'http://192.168.10.150', // node服务地址  必选
  userName: '匿名', // 用户名  必选
  baseUrl: '/p/', // 路径
  showControls: true, // 是否显示控件
  showChat: true, // 是否显示聊天按钮
  showLineNumbers: false, // 是否显示行号
  useMonospaceFont: false, // 使用等宽字体
  noColors: false, // 禁用用户的文本背景色
  userColor: false, // 当前用户的文本背景色,eg. #f00f00
  hideQRCode: true, // 隐藏二维码
  alwaysShowChat: false, // 始终显示聊天框
  plugins: { }, // 与插件相关的选项,与基本的Etherpad配置无关
  rtl: false, // 从右向左显示文本
}

width: '100%' // 可选,默认100%,可写成px等单位
height: '600px' // 可选,默认600px,可写成%等单位
border: 'none' // 可选,默认none

内置方法

setContent: 设置当前便笺文本内容
setHtml: 设置当前便笺HTML内容
appendContent: 向当前便笺末尾插入内容,注:会清除原有格式
getContent:获取当前便笺文本内容,返回一个promise对象,具体使用方法看下例
getHtml: 获取当前便笺html内容,返回一个promise对象,具体使用方法看下例
getDownloadUrl: 获取PDF下载地址

使用示例

<template>
  <div class="home">
    <etherpad-vue ref='etherpad' :config='etherpadConfig' :height="'700px'" :width="'80%'"></etherpad-vue>
  </div>
</template>

<script>
  import etherpadVue from 'etherpad-vue'

  export default {
    name: 'Home',
    components: {
      etherpadVue
    },
    data() {
      return {
        etherpadConfig: {
          ETHERPAD_APIKEY: 'bf670df65023cdeb5a52',
          id: 'toke',
          host: 'http://192.168.10.150',
          userName: '邓'
        }
      }
    },
    mounted(): {
      this.$refs.etherpad.setContent('123')
      this.$refs.etherpad.appendContent('456')
      let data = `<!DOCTYPE html><html><head><meta charset="utf-8"><title>菜鸟教程(runoob.com)</title></head><body><h1>我的第一个标题</h1><p>我的第一个段落。</p></body></html>`
      this.$refs.etherpad.setHtml(data)
    },
    methods: {
      getContent() {
        this.$refs.etherpad.getContent().then((res) => {
          console.log(res)
        })
        this.$refs.etherpad.getHtml().then((res) => {
          console.log(res)
        })
      }
    }
  }
</script>