Import
import { NuiMarkdown } from '@needless-ui/angular/markdown';NuiMarkdown
Renders Markdown as elements.
| Name | Type | Default | Description |
|---|---|---|---|
textInput | string | '' | The Markdown. |
streamingInput | boolean | false | The text is still arriving. |
headingLevelInput | number | 3 | The level of a # heading. Deeper ones follow, up to 6. |
imagesInput | boolean | false | Shows images. Otherwise their text links to them, since an image can track. |
labelsInput | Partial<NuiMarkdownLabels> | The copy button’s texts and the like, to translate. | |
codeTemplateInput | TemplateRef | null | null | A code block template from elsewhere, such as a chat that holds this one. |
NuiMarkdownCode
Draws code blocks. The context holds the code, lang, and open while the block is still arriving.
nuiParseMarkdown
The parser and its helpers, for use without the component.
| Name | Type | Default | Description |
|---|---|---|---|
nuiParseMarkdownMethod | (text, { streaming? }) => NuiMarkdownBlock[] | The tree of blocks and inlines the component draws. | |
nuiMarkdownToTextMethod | (text) => string | The plain text, a line per block, to announce or preview. | |
nuiSafeUrlMethod | (url) => boolean | Whether a link goes to a web, mail or phone address. |