Closed linlinNB closed 3 years ago
You can use the mathfieldConfig
-property to provide configuration for the underlying mathfield, like this:
<MathfieldComponent
initialLatex="f(x)"
mathfieldConfig={{
onKeystroke: (mathfield, keystroke, event) => { /* whatever */ },
style: {
fontSize: 15,
},
}}
/>
You can see a complete documentation of all the configuration options here
Hope that helps.
Thank you for your answer. I find problem that ’style‘ attribute doesn't work.
The style
attribute is not a valid MathLive option (but maybe it's a mathlive-react attribute?). With MathLive, the way you would control the size of the mathfield is by styling the element containing the mathfield (i.e. setting the CSS font-size
attribute of that element). I think this should also work with mathlive-react, though.
how to setting Fontsize?