code plugin for editorjs
npm install @juratbek/editorjs-codeCode editor for Editor.js
Allows you to write codes
``shell`
npm i @juratbek/editorjs-code
`shell`
yarn add @juratbek/editorjs-code
Add the Code tool to the tools property of the Editor.js initial config.
`javascript
import EditorJs from "@editorjs/editorjs";
import Code from "@juratbek/editorjs-code";
const editor = EditorJs({
// ...
tools: {
code: Code,
},
});
`
| Field | Type | Description | Default value |
| --------------- | -------- | ----------------------- | ------------- |
| defaultLanguage | string | default coding language | javascript |
| Field | Type | Description |
| -------- | -------- | --------------- |
| code | string | written code |string` | coding language |
| language |