text alignment block tune tool for Editor.js
npm install editorjs-text-alignment-blocktune
If you can help, please push the Star button :)
Get the package
``shell`
npm i --save editorjs-text-alignment-blocktune
Include module at your application
`javascript`
const AlignmentTuneTool = require('editorjs-text-alignment-blocktune');
1. Upload folder dist from repositorydist/bundle.js
2. Add file to your page.
https://cdn.jsdelivr.net/npm/editorjs-text-alignment-blocktune@latest
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
| 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 |