update markdown editor and renderer

This commit is contained in:
Mario Pesch
2022-02-22 11:18:51 +01:00
parent 115e4acc6c
commit 39c8fd504f
4 changed files with 17 additions and 10 deletions
+4 -3
View File
@@ -7,6 +7,8 @@ import BlocklyWindow from "../Blockly/BlocklyWindow";
import Grid from "@material-ui/core/Grid";
import Typography from "@material-ui/core/Typography";
import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm";
import remarkGemoji from "remark-gemoji";
class Instruction extends Component {
render() {
@@ -15,14 +17,13 @@ class Instruction extends Component {
var areRequirements = step.requirements && step.requirements.length > 0;
return (
<div>
{/* <Typography variant="h4" style={{ marginBottom: "5px" }}>
{step.headline}
</Typography> */}
<Typography style={isHardware ? {} : { marginBottom: "5px" }}>
<ReactMarkdown
className={"tutorial"}
linkTarget={"_blank"}
skipHtml={false}
allowDangerousHtml={true}
remarkPlugins={[remarkGfm, remarkGemoji]}
>
{step.text}
</ReactMarkdown>