Socket
Socket
Sign inDemoInstall

editorjs-break-line

Package Overview
Dependencies
0
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    editorjs-break-line

BreakLine and divider Tool for Editor.js


Version published
Maintainers
2
Install size
33.0 kB
Created

Changelog

Source

1.0.10 (25.04.2024)

  • Add stale issues policy in CONTRIBUTING.md.
  • Update the codeql.yml.

Readme

Source

EditorJS BreakLine Tool

stability-stable Coverage Status OpenSSF Best Practices OpenSSF Scorecard

Break Line and divider Tool for Editor.js.

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

Keywords

FAQs

Last updated on 25 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc