Skip to content

Extension of Quill's table module with support for grid-style table picker

License

Notifications You must be signed in to change notification settings

unzld/quill-better-table-picker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quill-better-table-picker

An extension of the table module for Quill, with support for toolbar table picker. For this to work I had to extend snow theme.

Requirements

quilljs v2.0.0-dev.3

Since I use webpack externals to bundle, you must expose Quill to window object, like load quill.js by script tag globally. Or you may need to fork this repo and build what you need.

Installation

npm install quill-better-table-picker

Usage

Load quill and style dependencies

<script src="https://cdnjs.cloudflare.com/ajax/libs/quill/2.0.0-dev.3/quill.min.js" type="text/javascript"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/quill/2.0.0-dev.3/quill.snow.min.css" rel="stylesheet">
<link href="https://unpkg.com/[email protected]/dist/quill-better-table-picker.css" rel="stylesheet">

ES6

import QuillBetterTable from "src/quill-better-table-picker.js";

Quill.register(
  {
    "modules/better-table": QuillBetterTable,
  },
  true
);

window.onload = () => {
  const quill = new Quill("#editor-wrapper", {
    theme: "better-table-snow",
    modules: {
      "better-table": true,

      toolbar: [
        ["clean"],
        [
          {
            list: "ordered",
          },
          {
            list: "bullet",
          },
        ],
        [
          {
            indent: "-1",
          },
          {
            indent: "+1",
          },
        ],
        [
          "bold",
          "italic",
          "underline",
          "strike",
          {
            script: "super",
          },
          {
            script: "sub",
          },
        ],
        [
          "link",
          {
            "better-table": [],
          },
        ],
      ],
    },
  });
};

License

MIT License

About

Extension of Quill's table module with support for grid-style table picker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published