@groupher/editor-code

1.0.30 • Public • Published

Code Tool

Provides Code Blocks for the Editor.js.

image

Installation

Install via NPM

Get the package

npm i --save-dev @groupher/editor-code

Include module at your application

const Code = require('@groupher/editor-code');

Download to your project's source dir

  1. Upload folder dist from repository
  2. Add dist/bundle.js file to your page.

Usage

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

var editor = EditorJS({
  ...
  
  tools: {
    ...
    code: Code,
  },
  
  ...
});

Output data

Field Type Description
text string code's text
lang string code's language
{
    "type" : "quote",
    "data" : {
        "text" : ""body {  color: tomato;  margin-left: 20px;};",
        "lang" : "css"
    }
}

Package Sidebar

Install

npm i @groupher/editor-code

Weekly Downloads

54

Version

1.0.30

License

MIT

Unpacked Size

156 kB

Total Files

16

Last publish

Collaborators

  • mydearxym