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

The HTML style tag can change the style of elements on the page #649

Closed
yuryYudanau opened this issue Jul 18, 2024 · 2 comments
Closed

The HTML style tag can change the style of elements on the page #649

yuryYudanau opened this issue Jul 18, 2024 · 2 comments

Comments

@yuryYudanau
Copy link

If you insert <style>body{display:none;}</style> into the editor, the page disappears.

jaywcjlove added a commit that referenced this issue Jul 23, 2024
@jaywcjlove
Copy link
Member

@yuryYudanau

<MDEditor
value={value}
height="100%"
previewOptions={{
disallowedElements: ['style'],
}}
visibleDragbar={false}
onChange={setValue}
/>

github-actions bot added a commit that referenced this issue Jul 23, 2024
@yuryYudanau
Copy link
Author

Thank you. It works

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