add mml to hint_question

This commit is contained in:
Majd_dk 2025-08-03 12:06:11 +03:00
parent 8eb0aabada
commit b6d86dc0d9
2 changed files with 10 additions and 6 deletions

View File

@ -7,6 +7,8 @@ import ValidationField from "../../../../../../Components/ValidationField/Valida
import MaltySelectTag from "../Tags/MaltySelectTag"; import MaltySelectTag from "../Tags/MaltySelectTag";
import { toast } from "react-toastify"; import { toast } from "react-toastify";
import SelectTagV2 from "../../../../../../Components/CustomFields/SelectTagV2"; import SelectTagV2 from "../../../../../../Components/CustomFields/SelectTagV2";
import LaTeXInputMemo from "../../../../../../Components/LatextInput/LaTeXInputMemo";
import { Field } from "formik";
export const Question: React.FC<any> = React.memo(({ index, data }) => { export const Question: React.FC<any> = React.memo(({ index, data }) => {
const { values, setFieldValue, ShowHint, t } = data; const { values, setFieldValue, ShowHint, t } = data;
@ -56,15 +58,16 @@ export const Question: React.FC<any> = React.memo(({ index, data }) => {
<div className="exercise_form_width"> <div className="exercise_form_width">
{ShowHint && ( {ShowHint && (
<ValidationField <Field
component={LaTeXInputMemo}
className=" " className=" "
placeholder="_" placeholder="_"
name={`Questions.${index}.hint`} name="hint"
label="hint_question" label={t("input.hint_question")}
type="TextArea" type="TextArea"
style={{ width: "100%", height: 60, resize: "none" }} style={{ width: "100%", height: 60, resize: "none" }}
autoSize={{ minRows: 2, maxRows: 10 }}
showCount={false} showCount={false}
autoSize={{ minRows: 2, maxRows: 10 }}
/> />
)} )}
<MaltySelectTag parent_index={index} /> <MaltySelectTag parent_index={index} />

View File

@ -75,11 +75,12 @@ const Form = () => {
<div className="exercise_form_width"> <div className="exercise_form_width">
{ShowHint && ( {ShowHint && (
<ValidationField <Field
component={LaTeXInputMemo}
className=" " className=" "
placeholder="_" placeholder="_"
name="hint" name="hint"
label="hint_question" label={t("input.hint_question")}
type="TextArea" type="TextArea"
style={{ width: "100%", height: 60, resize: "none" }} style={{ width: "100%", height: 60, resize: "none" }}
showCount={false} showCount={false}