vuerd-plugin-quill

vuerd-core plugin quill

Packages no longer needed
Last updated 7 months ago by dineug .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vuerd-plugin-quill 
SYNC missed versions from official npm registry.

vuerd-plugin-quill

vuerd-core plugin quill

npm version Build Status

Document

Storybook
Live Demo

Install

$ yarn add vuerd-core
$ yarn add vuerd-plugin-quill
or
$ npm install vuerd-core
$ npm install vuerd-plugin-quill

Usage

// main.js or main.ts
import Vue from 'vue';
import VuerdCore from 'vuerd-core';
import Quill from 'vuerd-plugin-quill';
import 'vuerd-core/dist/vuerd-core.css';
import 'vuerd-plugin-quill/dist/vuerd-plugin-quill.css';

VuerdCore.use(
  Quill,
/*
  {
    imageUpload(files, callback) {
      // upload
      callback("URL");
    }
  }
*/
);

Vue.use(VuerdCore);
<vuerd-core/>

CDN Quick Start

<!DOCTYPE html>
<html>
<head>
  <title>vuerd-core demo</title>
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/vuerd-core/dist/vuerd-core.css">
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/vuerd-plugin-quill/dist/vuerd-plugin-quill.css">
</head>
<body>
  <div id="app">
    <vuerd-core />
  </div>
  <script src="https://cdn.jsdelivr.net/npm/vue"></script>
  <script src="https://cdn.jsdelivr.net/npm/vuerd-core/dist/vuerd-core.umd.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/vuerd-plugin-quill/dist/vuerd-plugin-quill.umd.min.js"></script>
  <script>
    const VuerdCore = window['vuerd-core'].default
    const Quill = window['vuerd-plugin-quill'].default
    VuerdCore.use(Quill)
    Vue.use(VuerdCore)
    new Vue({
      el: '#app'
    })
  </script>
</body>
</html>

Option interface

export interface Option {
  imageUpload?: (
    files: File[] | Blob[],
    callback: (url: string) => void
  ) => void;
  scope?: string[] | RegExp[];
  exclude?: string[] | RegExp[];
  editorOption?: EditorOption;
}

export interface EditorOption {
  theme?: Theme;
  toolbar?: any[] | boolean;
}

export type Theme = "snow" | "bubble";

Option

Name Type Default Describe
imageUpload function base64 image upload
scope [String | RegExp] ["rich"] file designation(string extension)
exclude [String | RegExp] exception file designation(string extension)
editorOption EditorOption default option quill option

default EditorOption

editorOption = {
  theme: "snow",
  toolbar: [
    [{ font: [] }, { header: [1, 2, 3, 4, 5, 6, false] }],
    [
      { color: [] },
      { background: [] },
      "bold",
      "italic",
      "underline",
      "strike"
    ],
    ["blockquote", "code-block"],
    ["link", "image", "video"],
    [
      { list: "ordered" },
      { list: "bullet" },
      { indent: "-1" },
      { indent: "+1" },
      { align: [] },
      { script: "sub" },
      { script: "super" }
    ],
    ["clean"]
  ]
};

License

MIT

Current Tags

  • 0.1.7                                ...           latest (7 months ago)

8 Versions

  • 0.1.7 [deprecated]           ...           7 months ago
  • 0.1.6 [deprecated]           ...           7 months ago
  • 0.1.5 [deprecated]           ...           8 months ago
  • 0.1.4 [deprecated]           ...           8 months ago
  • 0.1.3 [deprecated]           ...           8 months ago
  • 0.1.2 [deprecated]           ...           8 months ago
  • 0.1.1 [deprecated]           ...           8 months ago
  • 0.1.0 [deprecated]           ...           8 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |