1.0.0 • Published 4 years ago

@flaming-cl/math v1.0.0

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

npm.io

Math Tool for Editor.js

Transform Tex syntax/plain text to pretty math equations
Based on mathJax and mathjs

Usage

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

var editor = EditorJS({
  ...
  
  tools: {
    ...
    Math: {
      class: Math,
    },
  }
  
  ...
});

Config Params

This Tool has no config params

Output data

FieldTypeDescription
textstringMath 's text
Text can be plain text or Tex syntax($ can be omitted)
{
    "type" : "math",
    "data" : {
        "text" : "sqrt(9 / 3) - cos(pi / 4)^2",
    }
}
1.0.0

4 years ago