Documentation

Markdown Renderer

Renders markdown content with syntax highlighting and copy buttons on code blocks.

Installation

1import { MarkdownRendererComponent } from '@angular-ai-kit/core';

Live Demo

Hello Markdown

This is a bold statement and this is italic.

Code Example

typescript
const greeting = 'Hello, World!';
console.log(greeting);

Lists

  • First item
  • Second item
  • Third item

This is a blockquote

Features

  • Full GFM (GitHub Flavored Markdown) support
  • Code blocks with syntax highlighting
  • Copy buttons on code blocks
  • Safe HTML sanitization
  • Tables, lists, blockquotes support

API Reference

Inputs

Prop Type Default Description
content string required Markdown content to render
customClasses string '' Additional CSS classes

Outputs

Prop Type Default Description
codeBlockCopy EventEmitter<string> - Emitted when code block is copied

Usage Example

1<ai-markdown-renderer2  [content]="markdownContent"3  (codeBlockCopy)="handleCopy($event)"4/>