Questions tagged [react-markdown]

86 questions
9
votes
2 answers

How to add styling for elements in react-markdown?

I am passing various amounts of data in react markdown sich as tables, lists and h tags. I wanted to know how to style each element separately. I searched everywhere but there is no mention of how to style the elements other than just bold or…
bros
  • 259
  • 1
  • 4
  • 11
7
votes
2 answers

How can I resolve ReactMarkDown that uses "children" as a prop w/ Error Do not pass children as props

I have a Next.js app that I'm deploying to vercel and am using ReactMarkDown component to render some content from a Strapi backend. While this works locally, deployment fails with the following log: 49:54 Error: Do not pass children as props.…
darkecho2788
  • 85
  • 1
  • 7
5
votes
3 answers

Problem with Tailwind CSS when using the react-markdown component

The markdown is not working except for italic and bold. I have figured out that the problem is caused by Tailwind CSS because of how it handles text-size and other styles. If I comment out the index.css import (which defines the directives for…
ayex
  • 65
  • 7
5
votes
1 answer

Underline syntax with react-markdown

I'm currently running into a problem that I can't solve (I've been searching for solutions since this morning, but I can't manage to find what I need). I created a React app using react-markdown, allowing the user to edit some post-its, whose…
5
votes
2 answers

React Markdown links dont open in a new tab despite using target="_blank"

small component looks like so: // @flow import ReactMarkdown from "react-markdown"; import type { Node } from "react"; function LinkRenderer(props: any) { return ( {props.children} …
cts
  • 908
  • 1
  • 9
  • 30
4
votes
3 answers

react-markdown don´t render Markdown

I'm using react-markdown to render a value of an input. The problem is that the reduction is not being processed as it should be, for example if I use this expression " # hello world ", the text should be displayed as text in h1, but it displays it…
YCrhis
  • 165
  • 4
  • 14
3
votes
1 answer

React-markdown, gfm tables not working and other problems

I have been trying to render markdown in react using the react-markdown library, I have had 2 problems and 1 question which I have not been able to answer: When using the remark-gfm plug-in the tables do not render correctly. The spacing between…
3
votes
1 answer

How to get react-markdown to properly format backticks?

I am using the react-markdown (https://www.npmjs.com/package/react-markdown) component to render markdown. I ran into an issue with rendering `. It seems like it is not applying the highlighting aspect. This is what I am trying to allow. Some text…
xjinx
  • 185
  • 8
3
votes
1 answer

Can't display markdown on NEXTJS

Haloo, hope you have a great day! I'm in the middle of learning something about markdown on react, i already success using react markdown editor, but now, when i want to display it, i got stuck, i'm using react-markdown and NEXTJS, and here's the…
3
votes
0 answers

Use rehype-raw in react-markdown to parse HTML element the type is not match

I'm using typescript in my react project, however when I use this code snippet I get an error {content} Type '(options?: void | Options | undefined) => void | Transformer
wtf512
  • 4,487
  • 9
  • 33
  • 55
3
votes
2 answers

React-Markdown Custom Component Declaration, How Can I Declare in the Renderer to Use a Custom Component?

Problem Using React-Markdown I can fully use my custom built components. But this is with specific pre-built keywords in the markdown. Like paragraph or images. That works PERFECTLY. But the problem is that these seem to all be pre-built…
NeuralCode
  • 135
  • 1
  • 2
  • 13
3
votes
1 answer

Reactmarkdown can not escape quotes and backticks

I have the code below which helps me display markdowns component with syntax highlighting. Everything works fine except when I input ``` which is always going to happen because am taking the markdown source from an input field. const renderers = { …
2
votes
1 answer

How can I insert variables in a markdown text from a NEXT or REACT frontend code?

I am very new with programming (legal professional) and builing a legaltech app. Essentially, I need to be able to have a markdown file where a few variables are changeable from the frontend code which is in NEXT JS. The markdown file will then be…
2
votes
0 answers

Preferring span instead of paragraph - react-markdown

When I put some text in markdown, by default it is wrapped inside paragraph, what makes some problems sometimes (when we don't want to have margins from paragraph and be forced to remove them manually each time). My question is - are we able to…
Sheppard25
  • 493
  • 1
  • 7
  • 22
2
votes
1 answer

How can I convert Markdown to HTML using react-markdown, and export it as HTML code?

I'm trying to export HTML generated from Markdown text. ReactMarkdown component here converts html but I don't know how to export it so that the user can actually see html code that they can copy. Frist box is textarea that takes markdown. The…
WltMr
  • 23
  • 3
1
2 3 4 5 6