Markdown format
EuiMarkdownFormat is a read-only way to render markdown-style content in a page. It is a peer component to EuiMarkdownEditor and has the ability to be modified by additional markdown plugins.
Built in plugins
EuiMarkdownFormat is a wrapper that will render Markdown provided. EuiMarkdownFormat uses Remark by default. The translation layer automatically substitutes raw HTML output with their EUI equivalent. This means anchor, code blocks and horizontal rules will become EuiLink, EuiCodeBlock and EuiHorizontalRule components respectively.
Text sizing and coloring
EuiMarkdownFormat uses EuiText as a wrapper to handle all the CSS styling when rendering the HTML. It also gives the ability to control the text size and color with the
textSize
and color
props, respectively.Link validation for security
Markdown content often comes from untrusted sources like user generated content. To help with potential security issues, EuiMarkdownRenderer
only renders links if they begin with https:
, http:
, mailto:
, or /
.
**Links starting with http:, https:, mailto:, and / are valid:**
* https://elastic.com
* http://elastic.com
* https link to [elastic.co](https://elastic.co)
* http link to [elastic.co](http://elastic.co)
* relative link to [eui doc's homepage](/)
* someone@elastic.co
* [email me!](mailto:someone@elastic.co)
**Other link protocols are kept as their markdown source:**
* ftp://elastic.co
* An [ftp link](ftp://elastic.co)
Kitchen sink
This example shows of all the styling and markup possibilities. It is mostly used for testing.