Markdown

Die Markdown Component rendert Texteingaben im Markdown-Format.GitHubMarkdown

Lorem ipsum dolor sit amet consectetur adipisicing elit. Cumque eius quam quas vel voluptas ullam aliquid fugit.

Properties

PropertyTypeDefaultDescription
color"default" | "dark" | "light" | "dark-static" | "light-static""default"The color schema of the markdown component.
headingOffsetnumber0Shifts all heading levels by the given offset.
componentsComponents-Allows overriding markdown element renderers from outside.
refRef<HTMLDivElement>-
classNamestring-The elements class name.
childrenReactNode-Markdown.
allowElementAllowElement-Filter elements (optional); `allowedElements` / `disallowedElements` is used first.
allowedElementsreadonly string[]-Tag names to allow (default: all tag names); cannot combine w/ `disallowedElements`.
disallowedElementsreadonly string[]-Tag names to disallow (default: `[]`); cannot combine w/ `allowedElements`.
rehypePluginsPluggableList-List of rehype plugins to use.
remarkPluginsPluggableList-List of remark plugins to use.
remarkRehypeOptionsReadonly<Options>-Options to pass through to `remark-rehype`.
skipHtmlboolean-Ignore HTML in markdown completely (default: `false`).
unwrapDisallowedboolean-Extract (unwrap) what’s in disallowed elements (default: `false`); normally when say `strong` is not allowed, it and it’s children are dropped, with `unwrapDisallowed` the element itself is replaced by its children.
urlTransformUrlTransform-Change URLs (default: `defaultUrlTransform`)

Auf dieser Seite