Skip to content

Repository files navigation

InlineCode Tool

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

Installation

Get the package

yarn add @editorjs/inline-code

Include module at your application

importInlineCodefrom'@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.

vareditor=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."
}
}

About

Inline-Code Tool for Editor.js 2.0

Topics

Resources

Stars

62 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages