Skip to content

Commit

Permalink
doc: update example #649
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jul 23, 2024
1 parent 9ca4bd9 commit 2520e88
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,30 @@ export default function App() {
}
```

### Disallowed Elements

```jsx mdx:preview
import React from "react";
import MDEditor from '@uiw/react-md-editor';

export default function App() {
const [value, setValue] = React.useState("**Hello world!!!** <style>body{display:none;}</style> ");
return (
<div className="container">
<MDEditor
value={value}
height="100%"
previewOptions={{
disallowedElements: ['style'],
}}
visibleDragbar={false}
onChange={setValue}
/>
</div>
);
}
```

### Preview Markdown

[![Open in CodeSandbox](https://img.shields.io/badge/Open%20in-CodeSandbox-blue?logo=codesandbox)](https://codesandbox.io/embed/react-md-editor-preview-markdown-vrucl?fontsize=14&hidenavigation=1&theme=dark)
Expand Down

0 comments on commit 2520e88

Please sign in to comment.