New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

editorjs-math

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

editorjs-math

Math Block for Editor.js

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
263
decreased by-12.91%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 13 Mar 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc