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

A tag don't work #40

Open
MoonSupport opened this issue Nov 14, 2020 · 2 comments
Open

A tag don't work #40

MoonSupport opened this issue Nov 14, 2020 · 2 comments

Comments

@MoonSupport
Copy link

MoonSupport commented Nov 14, 2020

"a Tag" works fine in react-markdown, but not in react-md-editor's preview.

image

Maybe I use this component.

import ReactMarkdownWithHtml from 'react-markdown/with-html';

Is there any way I can extend it?

I hope the problem is solved well, and thank you for making a nice app :)

@jaywcjlove
Copy link
Member

uiwjs/react-md-editor#56 (comment)

@MoonSupport You can try to setting props?: ReactMarkdownProps;

  • transformLinkUri - function|null Function that gets called for each encountered link with a single argument - uri. The returned value is used in place of the original. The default link URI transformer acts as an XSS-filter, neutralizing things like javascript:, vbscript: and file: protocols. If you specify a custom function, this default filter won't be called, but you can access it as require('react-markdown').uriTransformer. If you want to disable the default transformer, pass null to this option.
  • escapeHtml - boolean Setting to false will cause HTML to be rendered (see notes below about proper HTML support). Be aware that setting this to false might cause security issues if the input is user-generated. Use at your own risk. (default: true).
  • skipHtml - boolean Setting to true will skip inlined and blocks of HTML (default: false).

@MoonSupport
Copy link
Author

Thank you for your answer. :)

But sorry, I don't understand your propose. 😞

First, escapeHtml and skipHtml should be false ( default value ) for activating a tag

And, transformLinkUri seems to be something like middleware used to block specific protocols.

But I can't solve my problem just by understanding above it.

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