0.0.9 • Published 6 months ago

quill-easy-color v0.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

QuillJS Color Picker

A color picker module used in QuillJS

Demo

Install

npm install quill-easy-color

Usage

import Quill from 'quill';
import { EasyColorSnowTheme, EasyColorBubbleTheme } from 'quill-easy-color';
import 'quill-easy-color/dist/index.css';

// choose the theme you are using to register
Quill.register(
  {
    'themes/easy-color-snow-theme': EasyColorSnowTheme,
    // 'themes/easy-color-snow-theme': EasyColorBubbleTheme,
  },
  true
);
const quillBubble = new Quill('#editor-snow', {
  theme: 'easy-color-snow-theme',
  themeOptions: {
    localStorageKey: 'easy-color',
    closeAfterChange: false,
    customColorChangeDelay: 0,
  },
  modules: {
    toolbar: [
      [{ color: [] }, { background: [] }],
    ],
  },
});

Options

attributedescriptiontypedefault
localStorageKeylocalStorage key prefixstringused-color
closeAfterChangesnow theme close panel after change colorbooleantrue
customColorChangeDelaycustom color change debounce delaynumber300
keepChooseColorkeep choose colorbooleantrue

Custom

You can import EasyColorPicker to custom your own color picker

import Quill from 'quill';
import { EasyColorPicker } from './index';

export default class OwnPicker extends EasyColorPicker {
    ...
}
0.0.9

6 months ago

0.0.8

6 months ago

0.0.5

6 months ago

0.0.7

6 months ago

0.0.6

6 months ago

0.0.4

12 months ago

0.0.3-0

1 year ago

0.0.3

1 year ago

0.0.2-0

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

0.0.0

1 year ago