Renders the Markdown that TextEditor writes, wherever a dump's note, a
comment, a chat message or a description is shown.
I
MarkdownProps
Passed to Markdown by any component that shows a user's text.
- children: string
- className: string
-
everyone: boolean
Shows
@everyoneas a mention, from a chat message'smentionsEveryone. Without it,@everyoneis plain text: anyone may type it, and it reaches no one. -
inline: boolean
Drops the images, for a line-clamped teaser in a card, where an image would break the layout. The full text is one click away.
v
Markdown: React.MemoExoticComponent<(props: MarkdownProps) => React.JSX.Element>
Renders GFM with @mentions as profile links and single newlines kept. It
is memoized because parsing runs the whole remark pipeline, and the text
rarely changes when its parent re-renders.
Usage
import * as mod from "src/components/editor/Markdown.tsx";