Questions tagged [react-markdown]
86 questions
1
vote
0 answers
Highlight words within a ReactMarkdown component as they are spoken using SpeechSynthesis API
I am attempting to highlight words as they are spoken using SpeechSynthesis API in my React component. The text being read is in markdown format. This markdown is being rendered on the page using the "react-markdown" package. It might also be…

anonymoususer8893
- 113
- 10
1
vote
0 answers
How react-markdown should use MathJax (react-mathjax)
Could you help me please to create react component which can render markdown and which use MathJax.
I used this article Rendering Markdown and LaTeX in React to solve this problem, but ReactMarkdown now doesn't have such props as renderers. Also…

PNOML
- 21
- 3
1
vote
0 answers
Stop leading whitespace being stripped with react-markdown
Leading whitespace in my markdown file is being lost when rendering the text in a react-markdown component.
I am reading the file as follows,
fetch(file)
.then((res) => res.text())
.then((text) => this.setState({ markdown: text }));
and the…

louisdeb
- 360
- 4
- 16
1
vote
1 answer
How to render button onClick function in reactjs using react-markdown
I am trying to alert a button in react-markdown.
This is the code below:
import React, {useState, useEffect} from "react";
import {useNavigate} from "react-router-dom";
import '../App.css';
import ReactMarkdown from "react-markdown";
import…

Abdullah Roshan
- 67
- 7
1
vote
1 answer
How to mark end of blockquote in markdown - react-markdown
I've following markdown:
"Line0
Line1
Line2
> 1
>
> 2
>
> 3
>
> 4
>
> 5
>
> 6
line end"
I am using react-markdown to render this in UI. But new lines after then end of blockquotes are getting included in…

Rahul
- 5,594
- 7
- 38
- 92
1
vote
0 answers
React-markdown and react-syntax-highlighter
how are you? I'm building a blog with ReactMarkdown, and I want to render a custom component for the code blocks:

Emiliano Yaryura
- 11
- 1
- 2
1
vote
0 answers
I want to add react code into markdown files
I have a static website generated by Docusaurus and I added firebase authentication it works fine but the path to my markdown files still not secured (everyone can access it without authentication). Is it possible to add this code to markdown files…

hakima maarouf
- 1,010
- 1
- 9
- 26
1
vote
0 answers
How to set column width?
I'm using the react-native-markdown-display to display the following table:
## Männer:
| Alter | 18 - 25 | 26 - 35 | 36 - 45 | 46 - 55 | 56 - 65 | 65+ |
| --------------------- | ------- | ------- | ------- | ------- | ------- |…

Enter name here
- 67
- 1
- 8
1
vote
1 answer
how to get the text-underline from strapi articles to my gatsby frontend
I'm working on a support site with strapi(backend) and gatsbyjs/react (frontend).
I am trying to retrieve from my admin strapi the text I have underlined and display it in my frontend but it is not retrieving the tag correctly and is displaying…

lucastoni
- 43
- 5
1
vote
1 answer
Transforming markdown image into Next.js image realtime
I'm making a markdown editor with viewer (side by side).
I'm facing a problem where typing the syntax for image in markdown will cause a
Unhandled Runtime Error
Error: Image is missing required "src" property. Make sure you pass "src" in props to…

jasjamjos
- 79
- 6
1
vote
0 answers
Passing style from HTMLElement to JSX.Element
I have the following function which does some styling for ReactMarkdown.
td: (td: HTMLTableCellElement) => {
const { children, style } = td;
return (
{children}
…

Matthieu Riegler
- 31,918
- 20
- 95
- 134
1
vote
1 answer
remark-gfm footnotes are ignored
From the most recent remark-gfm documentation, I can see it should support footnotes. However, when I type something like:
Text here. [^1]
Text here. [^2]
[^1]: note 1
[^2]: note 2
This is displayed as text, rather than converted to HTML…

yldm
- 144
- 3
- 14
1
vote
1 answer
Using syntax highlighter with tsx react markdown
I'm following the Github https://github.com/remarkjs/react-markdown and am trying to add SyntaxHighlighter to my markdown code snippets. I'm getting an error mentioned below when trying to use the example code inside a function which I use to render…

hyl3rid
- 23
- 1
- 5
1
vote
1 answer
Line seperators are not present in rendered markdown using react-markdown
I am using react-markdown to render a markdown. The text content is rendered correctly but I cannot view the line separators under the heading and for the table. I tried pasting the same content in the demo https://remarkjs.github.io/react-markdown/…

Erick
- 1,098
- 10
- 21
1
vote
2 answers
Problem with rendering markdown in NextJS/React
once again I am trying to render markdown in NextJS/React. For some reason my code didn't work, here it is:
import ReactMarkdown from "react-markdown";
import gfm from 'remark-gfm';
const PostContent = () => {
const source = `
# Hello,…

Pro Poop
- 357
- 5
- 14