I have text as FRANK LOVING and here b tag should be rendered as bold like this FRANK LOVING in value of MUI text field. How can i do this in react.js
I tried below samples but nothing seems to be working and also thought of using dangerouslySetInnerHTML but its vulnerable to xss attack hence i dont want to use that and library like react-html-parser is very old not updated one. pls any help
<code>import { TextField} from "@mui/material";
import React, { useContext, useState } from "react";
const Result: React.FC = () => {
const [value, setValue] = useState("FRANK <b>LOVING</b>");
return(
<TextField value= {value} disabled multiline variant="standard" fullWidth/>);
}
</code>
<code>import { TextField} from "@mui/material";
import React, { useContext, useState } from "react";
const Result: React.FC = () => {
const [value, setValue] = useState("FRANK <b>LOVING</b>");
return(
<TextField value= {value} disabled multiline variant="standard" fullWidth/>);
}
</code>
import { TextField} from "@mui/material";
import React, { useContext, useState } from "react";
const Result: React.FC = () => {
const [value, setValue] = useState("FRANK <b>LOVING</b>");
return(
<TextField value= {value} disabled multiline variant="standard" fullWidth/>);
}