BreakLine and divider Tool for Editor.js
npm install @moxrbe/editorjs-break-line!stability-stable




Break Line and divider Tool for Editor.js.

- Adds an empty block
- Adds a divider block
- Keyboard shortcut CMD+SHIFT+ENTER
shell
$ npm i --save-dev editorjs-break-line
`Include module at your application
`javascript
import BreakLine from 'editorjs-break-line';
`$3
You can load a specific version of the package from jsDelivr CDN.
Require this script on a page with Editor.js.
`html
`Usage
Add a new Tool to the
tools property of the Editor.js initial config.`javascript
const editor = EditorJS({
tools: {
breakLine: {
class: BreakLine,
inlineToolbar: true,
shortcut: 'CMD+SHIFT+ENTER',
},
}
});
`Config Params
No config params required.
Tool's tunes
1. Add a divider line
Output data
| Field | Type | Description |
| -------------- | --------- | ------------------------------- |
| divider |
boolean | Add a divider lineData
`json
{
"type": "breakLine",
"data": {
"divider": true
}
},
`Development
Development mode
`shell
$ yarn build:dev
`Production release
1. Create a production bundle
`shell
$ yarn build
`2. Commit
dist/bundle.jsRun tests
`shell
$ yarn test
``[license]: https://github.com/kommitters/editorjs-break-line/blob/master/LICENSE
[coc]: https://github.com/kommitters/editorjs-break-line/blob/master/CODE_OF_CONDUCT.md
[changelog]: https://github.com/kommitters/editorjs-break-line/blob/master/CHANGELOG.md
[contributing]: https://github.com/kommitters/editorjs-break-line/blob/master/CONTRIBUTING.md