1.0.1 • Published 3 months ago

@7polo/editorjs-code2 v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
3 months ago

Code

Code Tool for Editor.js 2.0. power by codemirror.

npm.io

Feature

  • line number ✌️
  • code folder
  • theme selector (on-the-way )
  • language selector (on-the-way)
  • copy (on-the-way)
  • tab/shift+tab support

Usage

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

npm i @7polo/editorjs-code2
var editor = EditorJS({
  ...
  tools: {
    ...
    code: {
        class: Code,
        config: {
            defaultTheme: 'okaidia',
            defaultLanguage: 'java'
        }
    }
  }
});

Output data

This Tool returns code.

{
    "type" : "code",
    "data" : {
        "code": "body {\n font-size: 14px;\n line-height: 16px;\n}",
        "language": "css",
        "theme": "tomorrow"
    }
}
1.0.1

3 months ago

1.0.0

5 months ago

0.0.8

8 months ago

0.0.7

8 months ago

0.0.6

9 months ago

0.0.5

9 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago