New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

editorjs-mathlive

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

editorjs-mathlive

math editor for editorjs

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
83
186.21%
Maintainers
1
Weekly downloads
 
Created
Source

MathEditor tool

The MathEditor Block for the Editor.js.

editorjs-mathlive

Installation

Get the package

npm i --save editorjs-mathlive

or

yarn add editorjs-mathlive

Usage

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

import MathEditor from 'editorjs-mathlive';

var editor = EditorJS({
  tools: {
    math: MathEditor,
  }
});

Or init the MathEditor tool with additional settings

var editor = EditorJS({
  tools: {
    math: {
      class: MathEditor,
      inlineToolbar: true,
      config: {
        virtualKeyboardMode: 'manual',
        defaultMode: 'math',
        smartMode:false,
        virtualKeyboardTheme:'material',
      },
    },
  },
});

Config Params

FieldTypeDescription
virtualKeyboardModestringinitial mode of virtual keyboard. manual by default
defaultModestringinitial editing mode. math by default
smartModebooleanMathEditor mode. false by default
virtualKeyboardThemestringMathEditor keyboard theme. material by default

Config Params Optional values

FieldTypeOption values
virtualKeyboardModestringmanual, auto, onfocus,off
defaultModestringmath , inline-math, text
smartModebooleanfalse, true
virtualKeyboardThemestringmaterial, apple

Output data

This Tool returns data in the following format

FieldTypeDescription
typestringStyle of math text
latexstringMathematical equation text in latexs
{
  "type" : "math",
  "data" : {
    "type": "cdx-math-info",
    "latex" : "e=mc^2"
  }
}

Keywords

codex

FAQs

Package last updated on 31 Jan 2023

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