Socket
Socket
Sign inDemoInstall

editorjs-math

Package Overview
Dependencies
2
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    editorjs-math

Math Block for Editor.js


Version published
Weekly downloads
396
increased by49.43%
Maintainers
1
Install size
5.42 MB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 13 Mar 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc