Fix UI issues, timer logic, theme switcher, view solutions, and markdown rendering
This commit is contained in:
20
test4.js
Normal file
20
test4.js
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
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 => {
|
||||
// This simulates string with actual backslash (e.g. from JSON parse)
|
||||
const text = "Testing math $\\v(t) = \\int$ and $$\\alpha$$";
|
||||
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