Inference Logoinference.sh

Markdown

Renders markdown-formatted text with full styling support.

Preview

Renders headers, bold, italic, links, code blocks, lists, and more.

Usage

go
1node := models.WidgetNode{2    Type:  models.WidgetNodeTypeMarkdown,3    Value: "## Summary\n\nThis is **bold** and this is *italic*.",4}

Props

NameTypeDescriptionDefault
type"markdown"Node typerequired
valuestringMarkdown content""

Examples

Basic Markdown

go
1{2    Type:  models.WidgetNodeTypeMarkdown,3    Value: "Hello **world**!",4}

Rich Content

go
1{2    Type:  models.WidgetNodeTypeMarkdown,3    Value: `## Analysis Results4 5Here are the key findings:6 7- **Performance**: 15% improvement8- **Coverage**: 98% test coverage9- **Issues**: 3 minor warnings10 11\`\`\`json12{13  "status": "success",14  "score": 9515}16\`\`\`17`,18}

Code Snippet

go
1{2    Type:  models.WidgetNodeTypeMarkdown,3    Value: "Install with:\n\n```bash\nnpm install @inference/sdk\n```",4}
go
1{2    Type:  models.WidgetNodeTypeMarkdown,3    Value: `Check out these resources:4 51. [Documentation](https://docs.example.com)62. [API Reference](https://api.example.com)73. [Examples](https://github.com/example)8`,9}

Supported Syntax

ElementSyntax
Headers# H1, ## H2, ### H3
Bold**bold**
Italic*italic*
Code`code`
Code blocks```lang ```
Links[text](url)
Lists- item or 1. item
Blockquotes> quote

TypeScript

typescript
1const node: WidgetNode = {2  type: "markdown",3  value: "## Hello\n\nThis is **markdown**.",4}

Best Practices

  1. Use for rich content - Long-form text, documentation, explanations
  2. Use Text for simple content - Single-line text without formatting
  3. Escape special characters - Use backslash for literal *, #, etc.
  4. Test rendering - Preview markdown before shipping

we use cookies

we use cookies to ensure you get the best experience on our website. for more information on how we use cookies, please see our cookie policy.

by clicking "accept", you agree to our use of cookies.
learn more.