1.0.1 • Published 4 months ago

custom-alignment-blocktune v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

npm.io

Text Alignment tune tool for Editor.js

You can add text alignment to any block.

image

If you can help, please push the Star button :)

required

  • editor.js v2.22.3 ↑

Installation

Install via NPM

Get the package

npm i --save editorjs-text-alignment-blocktune

Include module at your application

const AlignmentTuneTool = require('editorjs-text-alignment-blocktune');

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-text-alignment-blocktune@latest

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:AlignmentTuneTool,
      config:{
        default: "right",
        blocks: {
          header: 'center',
          list: 'right'
        }
      },
    }
}

Config Params

FieldTypeDescription
defaultstring"left"/"center"/"right", If not set, it will be "left".
blocksobjectDefault alignment can be set for each block
acornacorn-import-assertionsajvajv-keywordsansi-stylesbabel-plugin-polyfill-corejs2babel-plugin-polyfill-corejs3babel-plugin-polyfill-regeneratorbig.jsbrowserslistbuffer-fromcaniuse-litechalkchrome-trace-eventclone-deepcolor-convertcolor-namecolorettecommandercommondirconvert-source-mapcore-js-compatcross-spawncssescdebugelectron-to-chromiumemojis-listenhanced-resolveenvinfoes-module-lexerescaladeescape-string-regexpeslint-scopeesrecurseestraverseesutilseventsfast-deep-equalfast-json-stable-stringifyfastest-levenshteinfind-cache-dirfind-upflatfunction-bindgensyncglob-to-regexpglobalsgraceful-fshas-flaghasownicss-utilsimport-localinterpretis-core-moduleis-plain-objectisexeisobjectjest-workerjs-tokensjsescjson-parse-even-better-errorsjson-schema-traversejson5kind-ofloader-runnerloader-utilslocate-pathlodash.debouncelru-cachemake-dirmerge-streammime-dbmime-typesmsnanoidneo-asyncnode-releasesp-limitp-locatep-trypath-existspath-keypath-parsepicocolorspkg-dirpostcsspostcss-modules-extract-importspostcss-modules-local-by-defaultpostcss-modules-scopepostcss-modules-valuespostcss-selector-parserpostcss-value-parserpunycoderandombytesrechoirregenerateregenerate-unicode-propertiesregenerator-runtimeregenerator-transformregexpu-coreregjsparserresolveresolve-cwdresolve-fromsafe-bufferschema-utilssemverserialize-javascriptshallow-cloneshebang-commandshebang-regexsource-mapsource-map-jssource-map-supportsupports-colorsupports-preserve-symlinks-flagtapableterserterser-webpack-pluginto-fast-propertiesundici-typesunicode-canonical-property-names-ecmascriptunicode-match-property-ecmascriptunicode-match-property-value-ecmascriptunicode-property-aliases-ecmascriptupdate-browserslist-dburi-jsutil-deprecatewatchpackwebpack-mergewebpack-sourceswhichwildcardyallist
1.0.1

4 months ago

1.0.0

4 months ago