react-markdown-editor icon indicating copy to clipboard operation
react-markdown-editor copied to clipboard

How can I get content normally ?

Open surohak opened this issue 4 years ago • 10 comments
trafficstars

How can I get content normally ? I mean without for example **'s, ##'s ...

surohak avatar Mar 17 '21 20:03 surohak

@SuroHak Did not understand what it meant.

jaywcjlove avatar Mar 18 '21 15:03 jaywcjlove

I mean getContent normally without ** , ## ..

surohak avatar Mar 18 '21 16:03 surohak

@SuroHak I don't know if it is what you want.

jaywcjlove avatar Mar 18 '21 16:03 jaywcjlove

https://codesandbox.io/s/strange-dream-2ovo5?file=/src/App.js

jaywcjlove avatar Mar 18 '21 16:03 jaywcjlove

@jaywcjlove I want to getContent without # in this example

surohak avatar Mar 18 '21 17:03 surohak

## title

content `title`

getContent ⇣⇣⇣⇣⇣⇣⇣⇣⇣⇣⇣⇣⇣⇣

title

content `title`

@SuroHak Does that mean it?

jaywcjlove avatar Mar 19 '21 03:03 jaywcjlove

Screen Shot 2021-03-19 at 22 38 09 but in your example when I click to getContent I see # title

surohak avatar Mar 19 '21 18:03 surohak

`## title

### ddd

content \`title\``.replace(/#/g, '')

@SuroHak

jaywcjlove avatar Mar 20 '21 18:03 jaywcjlove

You can use regular expressions to process the results.

jaywcjlove avatar Mar 20 '21 18:03 jaywcjlove

You can use https://www.npmjs.com/package/remove-markdown

shajil-t avatar May 24 '21 08:05 shajil-t