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

previewOptions for <MDEditor.Markdown/> #229

Closed
LukasGirsch opened this issue Aug 20, 2021 · 1 comment
Closed

previewOptions for <MDEditor.Markdown/> #229

LukasGirsch opened this issue Aug 20, 2021 · 1 comment

Comments

@LukasGirsch
Copy link

Hi there,

I checked the docs but could not find anything relating to this.

Can I add the previewOptions to the Markdown component ?

I tried doing it the way it works for the top-level component but not for .Markdown.

const MarkdownPreviewProps = {
    className:'cms-content',
    remarkPlugins: [remarkHint, remarkDirective, customPlugin],
  } ;
<MDEditor.Markdown 
    source={value}
    previewOptions={MarkdownPreviewProps}/>
@jaywcjlove
Copy link
Member

const MarkdownPreviewProps = {
  className:'cms-content',
  remarkPlugins: [remarkHint, remarkDirective, customPlugin],
} ;

<MDEditor previewOptions={MarkdownPreviewProps} />

<MDEditor.Markdown source="Hello Markdown!" {...MarkdownPreviewProps} />

@lukaa

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