GithubHelp home page GithubHelp logo

concludio / react-mathlive Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 16.0 2.17 MB

A react wrapper-component for mathlive.js

License: MIT License

TypeScript 95.67% JavaScript 4.33%
latex math mathlive react react-component react-wrapper

react-mathlive's People

Contributors

dependabot[bot] avatar erlendoeien avatar khazuar avatar nifdee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-mathlive's Issues

Support for latest MathLive beyond 0.68.1

It appears that this package is only compatible with MathLive up to version 0.68.1. Any version later than that and there appear to be errors initializing the mathfield.

Support for server side rendering?

It says document is not defined when used with server side rendering.

node_modules\mathlive\dist\mathlive.js:11955
     const gScriptUrl = (_b = (_a = document.currentScript) === null || _a === void 0 ? void 0 : _a.src) !== null && _b !== void 0 ? _b : getFileUrl();
[1]                        ^
[1]
[1] ReferenceError: document is not defined
[1]     at node_modules\mathlive\dist\mathlive.js:11955:24
[1]     at node_modules\mathlive\dist\mathlive.js:2:68

BUG: Reference to deprecated CSS-files

MathLive removed mathlive.css and mathlive.core.css as of v0.53.0 (link).

Need to update 'MathfieldComponent.tsx' so it does not use these styles.
Not too familiar with NPM, is there an easy fix without forking the repo?

How to use react-mathlive

Hello react mathlive team,
I am new in react, i want to use react-mathlive in my react app .
Is there any docs or a way to start using react-mathlive
And thank you .

TypeError: Cannot read property 'makeMathField' of undefined

I was trying to use your package the simple way as i could with this part of code to start :

render() {
  return <MathfieldComponent
    initialLatex="f(x)=\\log _10 x"
    onChange={this.onMathChange}
  />;
}

onMathChange(mathText) {
  console.log(mathText);
}

But i get this :
Capture d’écran du 2021-08-27 09-57-13

I don't understand why, can you help please ?

Problem with Next 13

Hi. I'm trying to run MathView or just any mathlive component as client component in Next.js 13 :| but i just simply get a lot of errors.

Is there any way that somone here, way smarter than me (with is not hard) could provide working example?

ReadOnly

Is it possible to disable/make the field readonly? It could be a very useful option for different uses.

mathfield component error

I used this Library in an ionic project , i am having difficult making showing the keyboard i have this error.
No overload matches this call.
Overload 1 of 2, '(props: ControlledProps | UncontrolledProps | Readonly | Readonly): MathfieldComponent', gave the following error.
Type '{ defaultMode: string; virtualKeyboardMode: string; }' is not assignable to type 'MathfieldOptions'.
Type '{ defaultMode: string; virtualKeyboardMode: string; }' is missing the following properties from type 'LayoutOptions': macros, horizontalSpacingScale, letterShapeStyle
Overload 2 of 2, '(props: Props, context: any): MathfieldComponent', gave the following error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.