Skip to content

Code syntax highlighting tool for Editor.js, Built with Codeflask

Notifications You must be signed in to change notification settings

HiroyasuNishiyama/editorjs-codeflask

 
 

Repository files navigation

EditorJs - Codeflask

NPM

npm i @calumk/editorjs-codeflask

JS

https://cdn.jsdelivr.net/npm/@calumk/editorjs-nested-checklist@latest

About

This is an EditorJs wrapper for CodeFlask - A lovely lightweight zero-dep code formatter

It was built to be an improvement on :

Demo

Demo

Built with:


Installation / use

import EditorJS from '@editorjs/editorjs';
import editorjsCodeflask from '@calumk/editorjs-codeflask';

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

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) (WIP - Codeflask #132)

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

About

Code syntax highlighting tool for Editor.js, Built with Codeflask

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 52.3%
  • HTML 26.4%
  • CSS 21.3%