Antd React : how to input a math formula on textfields

Viewed 1410

I was working on a project that serves different types of questions for a user.

<form name="dynamic_form_nest_item"  hideRequiredMark form={form} onFinish={onfinish} autoComplete="off">
  <Form.Item name= 'Question' label="Question">
  <Input.TextArea />
  </Form.Item>
</form>

I came across some issues when I tried to input a mathematical Question. The textfield doesn't support derivations, integrations, power functions and degrees.

How can I fix this issue?

1 Answers

There are some libraries that can convert a text to math equations. I suggest try to look on this one react-mathjax2.

Then make some binding so when you type on some Input you can also see the result math formula at the same time. Saved your text and use the library to render/display it.

See this example that I made:

Edit prod-http-h73fi

Related