1.0.2 • Published 1 year ago

@plebjs/editorjs-nowrap-tool v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Nowrap Tool

Nowrap Tool for the Editor.js to disallow line breaks inside text fragments.

Installation

Get the package via NPM or Yarn:

npm i @plebjs/editorjs-nowrap-tool
yarn add @plebjs/editorjs-nowrap-tool

Usage

Import the new tool and add it to the tools property of the Editor.js initial config:

import NowrapTool from '@plebjs/editorjs-nowrap-tool';

var editor = EditorJS({
  // ...
  tools: {
    // ...
    nowrap: {
      class: NowrapTool
    }
  },
  // ...
});

Config Params

This tool has no config params

Output data

Selected text will be wrapped with a span tag with an cdx-nowrap class.

{
    "type" : "text",
    "data" : {
        "text" : "Create a directory for your module, enter it and run <span class=\"cdx-nowrap\">npm init</span> command."
    }
}
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago