docs/developer_docs/components/ui/safemarkdown.mdx
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
The SafeMarkdown component from Superset's UI library.
<StoryWithControls component="SafeMarkdown" props={{ htmlSanitization: true }} controls={[ { name: "htmlSanitization", label: "Html Sanitization", type: "boolean", description: "Enable HTML sanitization (recommended for user input)" }, { name: "source", label: "Source", type: "text", description: "Markdown source string to render" } ]} />
Edit the code below to experiment with the component:
function Demo() {
return (
<SafeMarkdown
htmlSanitization
/>
);
}
| Prop | Type | Default | Description |
|---|---|---|---|
htmlSanitization | boolean | true | Enable HTML sanitization (recommended for user input) |
import { SafeMarkdown } from '@superset/components';
:::tip[Improve this page] This documentation is auto-generated from the component's Storybook story. Help improve it by editing the story file. :::