1.5.0 • Published 6 months ago

@editorjs/inline-code v1.5.0

Weekly downloads
3,830
License
MIT
Repository
github
Last release
6 months ago

npm.io

InlineCode Tool

Inline Tool for marking code-fragments for the Editor.js.

npm.io

Installation

Get the package

yarn add @editorjs/inline-code

Include module at your application

import InlineCode from '@editorjs/inline-code';

Optionally, you can load this tool from CDN JsDelivr CDN

Usage

Add a new Tool to the tools property of the Editor.js initial config.

var editor = EditorJS({
  ...
  
  tools: {
    ...
    inlineCode: {
      class: InlineCode,
      shortcut: 'CMD+SHIFT+M',
    },
  },
  
  ...
});

Config Params

This Tool has no config params

Output data

Marked text will be wrapped with a span tag with an inline-code class.

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

6 months ago

1.4.0

1 year ago

1.3.1

4 years ago

1.3.0

5 years ago