@digz6666/react-math-view
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

react-math-view

React bindings for MathLive

NPM JavaScript Style Guide

Install

npm install --save react-math-view
yarn add react-math-view

Usage

import { useRef } from 'react';
import MathView, { MathViewRef } from 'react-math-view';

const ref = useRef<MathViewRef>(null);
const toggleKeyboard = useCallback(() => ref.current?.executeCommand('toggleVirtualKeyboard'), [ref]);
const getSpokenValue = useCallback(() => ref.current?.getValue('spoken'), [ref]);
<MathView
 value="x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}"
 ref={ref}
  />

Example

Check out the live example.

Looking for React-Native?

Check out react-native-math-view.

Dev

Before you begin make sure to install dependecies

Don't forget to do the same in /example before running it

npm i /* or */ yarn --production=false

Available commands

// start dev servers for /src and /example
npm run dev

// publish to npm
npm run publish

// deploy gh-pages (example app)
npm run deploy

License

MIT © ShaMan123

Readme

Keywords

none

Package Sidebar

Install

npm i @digz6666/react-math-view

Weekly Downloads

3

Version

1.2.0

License

MIT

Unpacked Size

92.2 kB

Total Files

9

Last publish

Collaborators

  • digz6666