Fix UI issues, timer logic, theme switcher, view solutions, and markdown rendering
This commit is contained in:
19
test3.js
Normal file
19
test3.js
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
import("react-markdown").then(rm => {
|
||||
import("remark-math").then(math => {
|
||||
import("rehype-katex").then(katex => {
|
||||
import("react-dom/server").then(rds => {
|
||||
import("react").then(react => {
|
||||
const text = "The velocity of a particle moving along the x-axis is given by $\\v(t) = \\int_{0}^{t} (3\\tau^2 - 2\\tau) d\\tau$. What is the displacement of the particle at $t = 2$ seconds if it starts from the origin?";
|
||||
const el = react.createElement(rm.default, {
|
||||
remarkPlugins: [math.default],
|
||||
rehypePlugins: [katex.default],
|
||||
children: text
|
||||
});
|
||||
console.log(rds.renderToString(el));
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user