Hello, you don’t parse to markdown input. You only give input to preview screen. You shold check to sample project, how to markdown input shows on preview. For example this input;
Wild Header | Crazy Header | Another Header?
------------ | ------------- | -------------
Your content can | be here, and it | can be here....
And here. | Okay. | I think we get it.
Should be like this:
Wild Header
Crazy Header
Another Header?
Your content can
be here, and it
can be here…
And here.
Okay.
I think we get it.
Output should be table.
Also you can use to Markdown library package as this project explain say or you can write different parser regex rules. But you should parse to Markdown input. Happy coding.
Also you should parse your input with Marked library and then you can use marked input on dangerouslySetInnerHTML and this will help you to parse input dynamicly on preview div.
Also explanation of this challenge gives to CDNlink of this library. CDN means you can use an online code editor without installation. You can add this CDN via an HTML <script> tag or import it in the CodePen JS setup Package section. However, it gives an error because it imports a default export, but there is no default export. I fixed this by using the following approach:
import {marked} from "https://esm.sh/marked";
const markdownHTML = marked.parse(input);
Also I realise now, your codepeon have been installed Marked in Extarnad script section. You just need to import (you can import without cdn link with this way) and use it. Also you don’t need handleKeyUp.