JSPM

editorjs-text-alignment-blocktune

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7304
  • Score
    100M100P100Q150328F
  • License MIT

text alignment block tune tool for Editor.js

Package Exports

  • editorjs-text-alignment-blocktune

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (editorjs-text-alignment-blocktune) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Text Alignment tune tool for Editor.js

You can add text alignment to any block.

image

required

  • editor.js v2.20

Installation

Install via NPM

Get the package

npm i --save editorjs-paragraph-with-alignment

Include module at your application

const Paragraph = require('editorjs-paragraph-with-alignment');

Download to your project's source dir

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

Load from CDN

https://cdn.jsdelivr.net/npm/editorjs-paragraph-with-alignment@2.0.0

usage

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

Field Type Description
default string "left"/"center"/"right", If not set, it will be "left".
blocks object Default alignment can be set for each block