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

<> signs formatting

Open Lucjus opened this issue 4 years ago • 1 comments

Is there any way to prevent editor from live changing <> signs into escape signs in live editor?

https://codesandbox.io/s/markdown-editor-for-react-forked-cb14q

I would like to have normal syntax for the user like this one when editing with basically same output in editor preview.

Lucjus avatar Dec 28 '21 12:12 Lucjus

You can use remark or rehype rich plug-ins, or you can customize plug-ins.

<MDEditor 
  previewOptions={{
    remarkPlugins: [],
    rehypePlugins: []
  }}
/>
  • remarkPlugins (Array.<Plugin>, default: [])
    List of remark plugins to use. See the next section for examples on how to pass options
  • rehypePlugins (Array.<Plugin>, default: [])
    List of rehype plugins to use. See the next section for examples on how to pass options

I have a custom plug-in instance: rehype-video Maybe you can find inspiration.

oh, rehype-rewrite may solve your problem

@Lucjus

jaywcjlove avatar Dec 29 '21 01:12 jaywcjlove