Break Line and divider Tool for Editor.js.
- Adds an empty block
- Adds a divider block
- Keyboard shortcut
CMD+SHIFT+ENTER
Get the package
$ npm i --save-dev editorjs-break-line
Include module at your application
import BreakLine from 'editorjs-break-line';
Add a new Tool to the tools
property of the Editor.js initial config.
const editor = EditorJS({
tools: {
breakLine: {
class: BreakLine,
inlineToolbar: true,
shortcut: 'CMD+SHIFT+ENTER',
},
}
});
No config params required.
- Add a divider line
Field | Type | Description |
---|---|---|
divider | boolean |
Add a divider line |
Data
{
"type": "breakLine",
"data": {
"divider": true
}
},
Development mode
$ yarn build:dev
Production release
- Create a production bundle
$ yarn build
- Commit
dist/bundle.js
Run tests
$ yarn test
Bug reports and pull requests are welcome on GitHub https://github.com/kommitters/editorjs-break-line. Everyone is welcome to participate in the project. If you are thinking about contributing to the project, please check our Contributing Guide.
See the CHANGELOG for versions details.
See LICENSE for details.
Made with ๐ by kommit