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

equation-editor-react

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

equation-editor-react

Equation editor based on Mathquill for React web apps

latest
Source
npmnpm
Version
0.0.10
Version published
Weekly downloads
249
-52.21%
Maintainers
1
Weekly downloads
 
Created
Source

Equation Editor for React Applications

Version of package

By Douwe den Blanken (v0xnihili)

Demo

To see this package in action, a demo is available here. It is possible to type an equation and see the output in LaTeX underneath the editor in pink.

Usage

When embedding the EquationEditor component into your project, you have four properties you have to set. value and onChange speak for themselves, while autoCommands contains a list of commands for which you only have to type the name of the command with a \ in front of it. The same goes for the autoOperatorNames but then for operators.

import React, { useState } from "react";

import EquationEditor from "equation-editor-react";

const Example = () => {
  const [equation, setEquation] = useState("y=x");

  console.log(equation);

  return (
    <EquationEditor
      value={equation}
      onChange={setEquation}
      autoCommands="pi theta sqrt sum prod alpha beta gamma rho"
      autoOperatorNames="sin cos tan"
    />
  )
};

export default Example;

License

MIT

Keywords

typescript

FAQs

Package last updated on 02 Oct 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