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

@gefangshuai/vue-quill-editor

v1.1.21

Published

vue-quill-editor ---- # 使用方法 ```shell script yarn add @gefangshuai/vue-quill-editor ``` ```html <quill-editor :read-only="readOnly" ref="editor" :image="imageConfig" height="300" :auto-height="false"

Downloads

62

Readme

vue-quill-editor

使用方法

yarn add @gefangshuai/vue-quill-editor
<quill-editor :read-only="readOnly"
              ref="editor"
              :image="imageConfig"
              height="300"
              :auto-height="false"
              v-model="content">
    <h1>标题1</h1>
    <h1>标题2</h1>
    <h1>标题3</h1>
</quill-editor>

参数

  1. value (v-model): 绑定文本内容
  2. placeholder: 无内容时的文本提示
  3. toolbar: 工具栏,默认为:
    [
       [{'header': [1, 2, 3, 4, 5, false]}],
       [{'color': []}, {'background': []}],          // dropdown with defaults from theme
       ['bold', 'italic', 'underline', 'strike'],        // toggled buttons
       ['link', 'image'],
       [{'list': 'ordered'}, {'list': 'bullet'}],
       ['blockquote', 'code-block'],
       [{'indent': '-1'}, {'indent': '+1'}],          // outdent/indent
       [{'align': []}],
       ['clean']
    ]
  4. image: 图片上传的配置信息,如下:
    {
        "serverUrl": "图片上传的后台接收地址",
        "fileName": "请求参数,默认 'file'",
        "withCredentials": "是否跨域,默认 true",
        "multiple": "是否允许一次上传多张图片,默认 true"
    }
    如果不配置,则默认为base64图片插入到编辑器
  5. readOnly: 是否只读,默认false。
  6. autoHeight: 编辑器高度随内容自适配,默认true。
  7. height: 编辑器初始化时的高度,默认'200px'。

事件

  1. textChange: 监听内容发生变化
  2. selectionChange: 监听内容选择发生变化
  3. editorChange: 监听编辑器的所有变化

方法

  1. getHtml(): String 返回编辑器内容
  2. setHtml(content): 为编辑器赋值
  3. getText(): 获取纯文本
  4. getContents(): 获取内容对象
  5. getLength(): 获取内容长度
  6. blur(): 使编辑器失去焦点
  7. focus(): 使编辑器获取焦点
  8. hasFocus(): 判断编辑器是否获取焦点