uiwjs / react-md-editor

A simple markdown editor with preview, implemented with React.js and TypeScript.
https://uiwjs.github.io/react-md-editor
MIT License
2.19k stars 160 forks source link

<> signs formatting #318

Open Lucjus opened 2 years ago

Lucjus commented 2 years ago

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.

jaywcjlove commented 2 years ago

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

<MDEditor 
  previewOptions={{
    remarkPlugins: [],
    rehypePlugins: []
  }}
/>

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

oh, rehype-rewrite may solve your problem

@Lucjus