1.0.2 • Published 3 years ago

editorjs-math v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

npm.io

Math Tool for Editor.js

image

Transform laTex text to pretty math equations

Demo: https://flaming-cl.github.io/editorPlugin
This is a plugin for Editor.js. To use this package, you need to install editorjs first
Here are the supported functions: https://katex.org/docs/supported.html

Install via NPM

Get the package

npm i --save-dev editorjs-math

Include module at your application

const mathTex = require('editorjs-math');
// or import MathTex from 'editorjs-math';

Load from CDN

<script src="https://cdn.jsdelivr.net/npm/editorjs-math@1.0.2/dist/bundle.js"></script>

Usage

Add a new Tool to the tools property of the Editor.js initial config.

var editor = EditorJS({
  ...
  
  tools: {
    ...
    math: {
      class: MathTex, // for CDN: window.MathTex
    },
  }
  
  ...
});

Config Params

This Tool has no config params

Output data

FieldTypeDescription
textstringMath text
  {
        "type" : "math",
        "data" : {
            "text" : "\\{1,2,3,\\ldots ,n\\}",
        }
    }

Credits

Katex: https://github.com/KaTeX/KaTeX

1.0.2

3 years ago

1.0.16

3 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago