1.0.0 • Published 5 months ago

editorjs-align-blocktune v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
5 months ago

Text Alignment tune tool for Editor.js

You can add text alignment to any block (heading, paragraph).

align

Installation

Install via NPM

Get the package

npm i --save editorjs-align-blocktune

Include module at your application

import AlignmentBlockTune from "editorjs-align-blocktune";

Usage

And look Editor.js document

tool:{
    list: {
      class: List,
      inlineToolbar: true,
    },
    header: {
      class: Header,
      tunes: ['anyTuneName'],
    },
    paragraph: {
      class: Paragraph,
      inlineToolbar: false,
      tunes: ['anyTuneName'],
    },
    anyTuneName: {
      class: AlignmentBlockTune,
      config:{
        default: "right",
        blocks: {
          header: 'center',
          list: 'right'
        }
      },
    }
}

Config Params

FieldTypeDescription
defaultstring"left"/"center"/"right"/"justify", If not set, it will be "left".
blocksobjectDefault alignment can be set for each block