1.1.1 • Published 7 months ago

editorjs-multicolumn v1.1.1

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

Multicolumn Block Tool for Editor.js

Adds the ability to make 2 and 3 column content.

Preview

Preview image

Installation

Install via NPM

Get the package

$ npm i editorjs-multicolumn

Include module at your application

import Multicolumn from 'editorjs-multicolumn';

Load from CDN

You can load a specific version of the package from jsDelivr CDN.

Require this script on a page with Editor.js.

<script src="https://cdn.jsdelivr.net/npm/editorjs-multicolumn"></script>

Download to your project's source dir

  1. Upload folder dist from repository
  2. Add dist/editorjs-multicolumn.bundle.js file to your page.

Usage

const editor = EditorJS({
  // ...
  tools: {
    // ...
    multicolumn: {
      class: Multicolumn,
      config: {
        editorLibrary: EditorJS,
        editorTools: {
          header: {
            class: Header,
            inlineToolbar: false,
            config: {
              placeholder: 'Header'
            }
          },
          checklist: Checklist,
          delimiter: Delimiter,
          // ...
        }
      }
    },
  }
  // ...
});

Config Params

FieldTypeDescription
editorLibraryobjectEditorJS library
editorToolsobjectConfiguration of editor blocks to be available in multicolumn
editorTunesobject[]Configuration of editor block tunes to be available in multicolumn

Output data

This Tool returns data with following format

FieldTypeDescription
columnsintegerNumber of columns (2 of 3)
contentobject[]Array of saved EditorJS data
1.1.1

7 months ago

1.1.0

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago