0.2.3 • Published 1 year ago

editorjs-codeblock v0.2.3

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

CodeBlock Tool

Version of EditorJS that the plugin is compatible with

Provides Headings Blocks for the Editor.js.

Installation

Install via NPM

Get the package

npm i editorjs-codeblock

Include module at your application

import CodeBlock from "codeblock"

Usage

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

var editor = EditorJS({
  ...

  tools: {
    ...
    CodeBlock: CodeBlock,
  },

  ...
});

Output data

FieldTypeDescription
codestringsource code in editor
{
  "type": "CodeBlock",
  "data": {
      "code": "function hello() {\n\talert('Hello world!');\n}"
  }
}
0.2.3

1 year ago

0.2.2

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago