1.0.3 • Published 3 years ago

editorjs-maths v1.0.3

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

Math Tool for Editor.js

Math Tool for the Editor.js allows to include math in your articles. You can see it in action here.

Install

Download the package through npm (or yarn)

npm i --save-dev editorjs-maths
yarn add editorjs-maths

and include the package in your app

const MathTool = require('editorjs-maths');
// or import MathTool from 'editorjs-maths';

You can also load it from CDN

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

Usage

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

var editor = EditorJS({
  ...

  tools: {
    ...
    math: MathTool,
  }

  ...
});

Config Params

FieldTypeDescription
placeholderstringCode Tool's placeholder string

Output data

This Tool returns math.

{
	"type": "code",
	"data": {
		"tex": "x^2"
	}
}

KaTeX

This tool is build on top of KaTeX.

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

2.7.0

3 years ago