JSPM

@init-kz/editorjs-code-highlight

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q50593F
  • License MIT

A micro code-editor for awesome web pages

Package Exports

  • @init-kz/editorjs-code-highlight
  • @init-kz/editorjs-code-highlight/index.css

Readme

EditorJs - init-code-highlight-ts

Logo

NPM

npm i @init-kz/editorjs-code-highlight

About

This is an EditorJs wrapper for init-code-highlight-ts - A lovely lightweight zero-dep code formatter

It was built to be an improvement on :

Built with:


Installation / use

import EditorJS from '@editorjs/editorjs';
import editorjsCode from '@init-kz/editorjs-code-highlight';

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

Data Format

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)
showCopyButton (optional) will show/hide the copy button (Defauly true)

Since language and linenumbers are optional, existing code blocks can safley use this plugin