editorjs-color
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

editorjs-color

editorjs plugin to provide color palette functionality

Install

npm install editorjs-color --save

Usage

import EditorJS from '@editorjs/editorjs';
import Color, { Config } from 'editorjs-color';
import "editorjs-color/style.css";

const editor = new EditorJS({
  holder: 'editorjs',
  tools: {
    color: {
      class: Color,
      config: {
        frontColors: ['#ff0000', '#00ff00', '#0000ff'], // front colors list
        backgroundColors: ['#ff0000', '#00ff00', '#0000ff'], // background colors list
      } satisfies Config,
    },
  },
});

License

MIT

Package Sidebar

Install

npm i editorjs-color

Weekly Downloads

40

Version

1.0.0

License

MIT

Unpacked Size

102 kB

Total Files

6

Last publish

Collaborators

  • vinsurs