@juratbek/editorjs-code
v1.1.8
Published
code plugin for editorjs
Readme
Code editor for Editor.js
Code editor for Editor.js Allows you to write codes
Installation
npm i @juratbek/editorjs-codeyarn add @juratbek/editorjs-codeUsage
Add the Code tool to the tools property of the Editor.js initial config.
import EditorJs from "@editorjs/editorjs";
import Code from "@juratbek/editorjs-code";
const editor = EditorJs({
// ...
tools: {
code: Code,
},
});Config Params
| Field | Type | Description | Default value |
| --------------- | -------- | ----------------------- | ------------- |
| defaultLanguage | string | default coding language | javascript |
Output data
| Field | Type | Description |
| -------- | -------- | --------------- |
| code | string | written code |
| language | string | coding language |
