Questions tagged [react-markdown]

86 questions
0
votes
0 answers

react-markdown: Any plugin or ready solution for highlighting texts in html then store as markdown

In a React application I use react-markdown library to convert markdown string (received from API) to html. The following functionality also needs to be implemented: Let users highlight part of the text and mark them as correct or incorrect The…
k-lusine
  • 397
  • 4
  • 11
0
votes
0 answers

How can I make a contenteditable element that is parsed with markdown?

This is my website: https://zarmdev.github.io/To-doz-React/index.html In my website I have "panes" with titles and descriptions. In each of these panes, the title and description have contenteditable turned on because it allows the changed content…
0
votes
1 answer

While trying to get the h3 heading text value using react-markdown throws error

While trying to get the h3 heading text value using react-markdown, react web app throws following error in console. Could someone please advise, how can I get the h3 text value here ? Uncaught TypeError: reactMarkdown.props.children.filter is not…
soccerway
  • 10,371
  • 19
  • 67
  • 132
0
votes
0 answers

Error when trying to import react-markdown dynamically

I'm attempting to dynamically import react-markdown so that it loads on the client-side, as advised in these resources (here and here). However, I'm encountering a TypeScript error and later a runtime error. Previously, everything was working fine…
eugenekr
  • 6,260
  • 3
  • 21
  • 26
0
votes
1 answer

How can we add multiple classes to the `ReactMarkdown` while rendering

I my react app, I am using react markdown for rendering the blog content. How can we add multiple classes to the ReactMarkdown. At the moment I have used dataArea class alone, but i would need to use below classes for styling purpose. Could…
soccerway
  • 10,371
  • 19
  • 67
  • 132
0
votes
1 answer

How can i get the typed in data as string and submit in my `MDEditor` of react app

How can I submit all of the typed data in MDEditor in my react app ? I have tried the below way to submit, but i am not getting the whole types in data as string, could someone please advise me ? import MDEditor from '@uiw/react-md-editor'; const…
soccerway
  • 10,371
  • 19
  • 67
  • 132
0
votes
1 answer

Render custom components in React Markdown

I'm building my website documentation and I need to render custom component and it's props, such as Hi! I'm a callout. I'm using contentlayer for the directory and react-markdown to render the content. Here's my code. …
Emiliano
  • 437
  • 1
  • 4
  • 14
0
votes
0 answers

How do I use ReactMarkdown with Deno's Fresh framework?

I'm a deno/fresh newbie and really appreciate the help. I'm importing ReactMarkup per the docs like this: import ReactMarkdown from "https://esm.sh/react-markdown@7"; But it's unclear how to use it in the fresh/preact world. Naively I've tried the…
TimDog
  • 8,758
  • 5
  • 41
  • 50
0
votes
1 answer

React-markdown render local images in html img tag

I'm using react-markdown with rehypeRaw plugin in Gatsby. And in my markdown file, im trying to render a picture which I have locally When I fetch images from the web its working so I'm assuming my src tag is not right? index.mdx,
Berkay
  • 35
  • 5
0
votes
1 answer

How to use react-markdown library with helix (Clojurescript)?

My Goal is to render markdown files on my cljs webpage. What I'm using: org.clojure/clojurescript 1.11.60 lilactown/helix 0.1.6 nodejs 18.9.1 and yarn 1.22.19 What I've tried: ;; blog.cljs (ns mypage.blog (:require [helix.core :refer [defnc $]] …
Elías
  • 121
  • 1
  • 10
0
votes
0 answers

How to use GitHub repository's md files(ex 100 files) content to be visible on a Website?

I am developing a project in which there will be some content. For example, a website having a list of technical articles. I am planning to create a open source GitHub repo in which people can add articles in markdown files. Like, one article = one…
codinn.dev
  • 263
  • 1
  • 8
0
votes
1 answer

Create a markdown unordered list from a string

I have a text column in our database(postgresql if that matters) that is then rendered using markdown. I want that text column to represent an unordered list, which means I need to somehow add a linebreak(\n) inside my string to workaround that. Ive…
Omri Shneor
  • 965
  • 3
  • 18
  • 34
0
votes
2 answers

Webpack error in CRA after adding react-markdown

I'v added a library called "react-markdown" and now it doesn't compiles and shows this error. How can I fix it? The request 'process/browser' failed to resolve only because it was resolved as fully specified (probably because the origin is strict…
Jak2k
  • 57
  • 1
  • 7
0
votes
0 answers

React-markdown not working properly - Module "process" has been externalized for browser compatibility. Cannot access "process.cwd" in client code

I'm working with the library react-markdown for the ease this gives at dealing with markdown files and content. But now I'm experiencing an unexpected error and tbh I do not really know how to solve it. I'll insert the code below to see if I can get…
0
votes
1 answer

Re render ReactMarkdown

Steps to reproduce: Using props children and update state component in which ReactMarkdown is placed. Expected behavior: I expected that when processing the same markdown, the generated html would not change. Actual behavior: I connected…
i like Cola
  • 277
  • 6
  • 15