Markdown
Markdown is a lightweight markup language for creating formatted text.
Props:
copyable
MarkdownWhisperCopyMode.Body
- Copy the text from the body of the component (including markdown).
body
The content that you want displayed. Supports markdown.
onCopy
Executes the provided function when the Markdown
is copied.
tooltip
Text that appears when hovering over the component.
onLinkClick
Whisper event handler that can be used to hook into click events on from links in the markdown component. Receives the label provided for the link when it is clicked.
Markdown Crash Course
Markdown is a shorthand way of adding styling to text. Here's a quick breakdown of some of the ways that you can achieve certain effects using it.
Styling: Support markdown including Bold ~~
strikethrough, italics, links and etc.Headings: We only support 3 different headings on Olive Helps
- Bold and ItalicMarkdownRendered Output
This text is ***really important***.
This text is really important.
This text is ___really important___.
This text is really important.
This text is __*really important*__.
This text is really important.
This text is **_really important_**.
This text is really important.
This is really***very***important text.
This is reallyveryimportant text.
BlockQuotes:
The rendered output looks like this:
Dorothy followed her through many of the beautiful rooms in her castle.
- Unordered Lists
To create an unordered list, add dashes (
-
), asterisks (*
), or plus signs (+
) in front of line items. Indent one or more items to create a nested list.MarkdownRendered Output- First item
- Second item
- Third item
- Fourth item
First item
Second item
Third item
Fourth item
* First item
* Second item
* Third item
* Fourth item
First item
Second item
Third item
Fourth item
+ First item
+ Second item
+ Third item
+ Fourth item
First item
Second item
Third item
Fourth item
- First item
- Second item
- Third item
- Indented item
- Indented item
- Fourth item
First item
Second item
Third item
Indented item
Indented item
Fourth item
Tables:
image
Examples
Now let's take a closer look of Markdown component! We use different markdown syntaxes to complete this example.
If you hover your cursor to the first component that contains the penguin, you are able to see a tooltip pop up. And if you click that area, you can copy the first component. This is the copied markdown text:
Reference: https://www.markdownguide.org/basic-syntax/
Last updated