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

vue-stackedit

v1.0.0

Published

An embedded markdown editor based on stackedit.

Readme

Overview

官方可集成版本

Vue-stackedit 是基于 stackedit 开发的一款在线markdown编辑器。

目前市面上已经有很多开源的的在线markdown编辑器了,经过多方调研后发现功能比较齐全且强大的有stackedit和作业部落的mdeditor,但是作业部落的产品并未开源,因此决定采用stackedit。

stackedit是一个完整的网站产品,但是很多情况下,我们只需要其中的编辑器功能,并且希望能方便地集成到自己的产品中,因此决定将其中的编辑器部分剥离出来,单独做成一个库,方便直接在自己的产品中调用。

编辑出来的文件基本可用,但是源文件中的store部分其实很多都不需要,而直接删掉又会报错,其中关联有点复杂,因此直接保留下来,以后有时间再慢慢梳理。强烈欢迎志愿者做贡献。

stackedit是基于Vue.js框架开发的,本项目沿用Vue.js框架,使用vue-cli工具开发,该版本暂不支持Latex公式,有需要的可在src/extensions/index.js中添加扩展。

该编辑器依赖lovue组件库的一些组件,以及图标库iconfont.js,需单独安装。

上传本地图片使用的请求是lovue组件库中带的$fetch.form()方法,也可以自己定义全局变量$fetch

自带一个Prism主题实现语法高亮。

Demo

开发与编译

git clone https://github.com/loliconer/vue-stackedit.git
cd vue-stackedit
npm install
npm run serve
npm run build

引用

既可以通过script标签引用,也可以import。

<script src="/dist/vueStackedit.umd.js"></script>
<div id="app">
  <v-editor url="上传本地图片的api" upload-field="上传本地图片请求的字段"></v-editor>
</div>

<script>
Vue.component(vueStackedit.name, vueStackedit)
new Vue({
  methods: {
    setContent() {
      vueStackedit.methods.setContent('hello')
    },
    getContent() {
      console.log(vueStackedit.methods.getContent())
    }
  }
}).$mount('#app')
</script>