@plebjs/editorjs-nowrap-tool
v1.0.2
Published
No-wrap Tool for Editor.js
Maintainers
Readme
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-toolyarn add @plebjs/editorjs-nowrap-toolUsage
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."
}
}