1.0.10 • Published 8 days ago

editorjs-break-line v1.0.10

Weekly downloads
46
License
MIT
Repository
github
Last release
8 days ago

EditorJS BreakLine Tool

stability-stable npm.io Coverage Status OpenSSF Best Practices OpenSSF Scorecard

Break Line and divider Tool for Editor.js.

npm.io

Notes

  • Adds an empty block
  • Adds a divider block
  • Keyboard shortcut CMD+SHIFT+ENTER

Installation

Install via NPM

Get the package

$ npm i --save-dev editorjs-break-line

Include module at your application

import BreakLine from 'editorjs-break-line';

Load from CDN

You can load a specific version of the package from jsDelivr CDN.

Require this script on a page with Editor.js.

<script src="https://cdn.jsdelivr.net/npm/editorjs-break-line"></script>

Usage

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',
    },
  }
});

Config Params

No config params required.

Tool's tunes

  1. Add a divider line

Output data

FieldTypeDescription
dividerbooleanAdd a divider line

Data

{
  "type": "breakLine",
  "data": {
      "divider": true
  }
},

Development

Development mode

$ yarn build:dev

Production release 1. Create a production bundle

$ yarn build
  1. Commit dist/bundle.js

Run tests

$ yarn test

Code of conduct

We welcome everyone to contribute. Make sure you have read the CODE_OF_CONDUCT before.

Contributing

For information on how to contribute, please refer to our CONTRIBUTING guide.

Changelog

Features and bug fixes are listed in the CHANGELOG file.

License

This library is licensed under an MIT license. See LICENSE for details.

Acknowledgements

Made with 💙 by kommitters Open Source

1.0.10

8 days ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.0

4 years ago