import React, { useState } from "react"; import MathJax from "react-mathjax"; const MathInput: React.FC = () => { const [input, setInput] = useState( "a^2+b^2=c^2 (x+a)^n=x=(-b±√(b^2-4ac))/2a ∑_(k=0)^n▒〖(n¦k) x^k a^(n-k) 〗", ); const handleChange = (event: React.ChangeEvent) => { const formattedInput = event.target.value.replace("_", " _ "); console.log(event.target.value); setInput(formattedInput); }; return (
); }; export default MathInput;