npm i @calumk/editorjs-codeflask
https://cdn.jsdelivr.net/npm/@calumk/editorjs-nested-checklist@latest
This is an EditorJs wrapper for CodeFlask - A lovely lightweight zero-dep code formatter
It was built to be an improvement on :
- https://github.com/editor-js/code - Too Basic
- https://github.com/dev-juju/codebox - Agressive styling, and exports more data than markdown can handle
import EditorJS from '@editorjs/editorjs';
import editorjsCodeflask from '@calumk/editorjs-codeflask';
var editor = EditorJS({
  // ...
  tools: {
    ...
    code : editorjsCodeflask
  },
});The data imported/exported from the block is as follows:
| Name | Description | 
|---|---|
| code | The code that is displayed in the editor, with line breaks | 
| language (optional) | The programming language | 
| showlinenumbers (optional) | Will show/hide the line numbers (Default true) (WIP - Codeflask #132) | 
Since language and linenumbers are optional, existing code blocks can safley use this plugin
