concludio / react-mathlive Goto Github PK
View Code? Open in Web Editor NEWA react wrapper-component for mathlive.js
License: MIT License
A react wrapper-component for mathlive.js
License: MIT License
I am trying to use react-mathlive
in a next.js project but facing this issue
./node_modules/mathlive/dist/mathlive-fonts.css
Global CSS cannot be imported from within node_modules.
Read more: https://nextjs.org/docs/messages/css-npm
Location: node_modules/react-mathlive/dist/MathfieldComponent.js
I'm dropping nextjs documentation link here
https://nextjs.org/docs/messages/css-npm
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.
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?
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.
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
error - ./node_modules/react-mathlive/dist/MathfieldComponent.js:53:0
Module not found: Package path ./dist/mathlive-fonts.css is not exported from package C:\www\app\node_modules\react-mathlive\node_modules\mathlive (see exports field in C:\www\app\node_modules\react-mathlive\node_modules\mathlive\package.json)
Is it possible to disable/make the field readonly? It could be a very useful option for different uses.
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);
}
I don't understand why, can you help please ?
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 .
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.