reactjs - 如何从字符串中渲染reactjs中的数学类型标签?
问题描述
所以,我正在尝试使用react-html-parser
. 它能够呈现普通的 html,但不能呈现数学类型的标签。
有没有一个插件可以渲染它们。
以下是我的包含这两个内容的字符串。
"<p>Math test<br />↵<math xmlns="http://www.w3.org/1998/Math/MathML"><msqrt><mn>25</mn></msqrt></math> <math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mn>2</mn><mn>3</mn></msup></math> <math xmlns="http://www.w3.org/1998/Math/MathML"><mo>∪</mo><mn>2</mn></math> </p>↵"
谢谢。
解决方案
推荐阅读
- bixby - 结构概念中具有相同类型的多个属性
- python - 如何使用 Selenium 自动点击 iframe 中的多个链接?
- c# - 如何在事件处理程序之外收集有关输入触摸的信息
- scala - 如何对案例类的内容进行排序
- django - 如何在 get_context_data RSS Feed django 2.2 中访问数据
- javascript - 将 JavaScript 与 WkWebView 一起使用 - UserMessageHandler 上的错误
- python-3.x - 从字符串中提取带逗号的数字
- javascript - 如何在 testcafe cucumberjs 中重新加载页面
- c# - Visual Studio not building InitialTargets or DefaultTargets if project is up to date
- asp.net - 在 URL QueryString 而不是隐藏字段中返回的 cardIdentifier