Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<> signs formatting #318

Open
Lucjus opened this issue Dec 28, 2021 · 1 comment
Open

<> signs formatting #318

Lucjus opened this issue Dec 28, 2021 · 1 comment

Comments

@Lucjus
Copy link

Lucjus commented Dec 28, 2021

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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants