MarkView provides rich markdown rendering powered by industry-standard libraries. From basic formatting to complex diagrams, MarkView handles it all with beautiful, theme-aware rendering.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sureshamal/markview/llms.txt
Use this file to discover all available pages before exploring further.
Core Markdown Engine
MarkView usesreact-markdown with powerful plugins to render your content:
react-markdown
Core markdown rendering engine with full CommonMark support
remark-gfm
GitHub Flavored Markdown: tables, task lists, strikethrough, and more
rehype-raw
Safely render raw HTML embedded in markdown
rehype-slug
Auto-generate IDs for headings to enable anchor links
GitHub Flavored Markdown (GFM)
MarkView supports all GitHub Flavored Markdown extensions via theremark-gfm plugin.
Implementation: page.tsx:5, 878
Supported GFM Features
- Tables
- Task Lists
- Strikethrough
- Autolinks
- Footnotes
Create beautiful data tables with alignment control:Tables automatically adapt to the current theme with proper borders and spacing.
Syntax Highlighting
Code blocks feature beautiful syntax highlighting powered byreact-syntax-highlighter with Prism.
Implementation: page.tsx:13-14, 88-95
Features
Theme-Aware Highlighting
Theme-Aware Highlighting
Code blocks automatically switch between light and dark color schemes:
- Light theme: Uses
prismstyle - clean, bright highlighting - Dark themes: Uses
vscDarkPlusstyle - VS Code Dark+ colors
Language Detection
Language Detection
Language is detected from the code fence:Supports 100+ languages including JavaScript, Python, TypeScript, Rust, Go, Java, and more.The language label is displayed in the code block header (page.tsx:66).
Copy to Clipboard
Copy to Clipboard
Every code block includes a copy button:
- Hover over a code block to see the copy button
- Click to copy the code to clipboard
- Visual feedback: Check mark appears for 2 seconds
- Preserves original formatting (no line numbers)
Inline Code
Inline Code
Inline code is rendered differently from code blocks:Inline code:
- No syntax highlighting
- No copy button
- Simple styling with background color
Code Block UI
Code blocks are rendered with a polished interface:- Header bar: Shows language name and copy button
- Borders: Theme-aware border colors using CSS variables
- Rounded corners: Modern 0.5rem border radius
- Background: Adapts to current theme
- Padding: Comfortable 1rem spacing
Mermaid Diagrams
Create diagrams and flowcharts using Mermaid syntax. Implementation: page.tsx:8, 21-32Usage
Create diagrams with mermaid code fences:Supported Diagram Types
Flowcharts
Directional graphs with shapes and connections
Sequence Diagrams
Show interactions between actors over time
Class Diagrams
UML class diagrams with relationships
State Diagrams
State machines and transitions
Gantt Charts
Project timelines and schedules
Pie Charts
Data visualization with percentages
Git Graphs
Visualize git commit history
ER Diagrams
Entity-relationship database diagrams
Theme Adaptation
Mermaid diagrams automatically adapt to your theme:- Light themes: Standard Mermaid rendering
- Dark themes: Color inversion filter for visibility
invert(0.8) hue-rotate(180deg) to make diagrams visible on dark backgrounds while preserving color relationships.
Raw HTML Support
MarkView safely renders raw HTML embedded in markdown viarehype-raw.
Implementation: page.tsx:6, 879
What You Can Embed
- HTML Elements
- Inline Styles
- Custom Attributes
Link Preview on Hover
MarkView provides rich link previews when you hover over links. Implementation: page.tsx:107-246External Links
Hovering over external links (http:// or https://) shows a preview popup displaying the full URL.- Appears below the link
- Shows full URL with word wrapping
- Stays within viewport bounds
- Styled with theme colors
Internal File Links
Hovering over relative links to other markdown files shows a preview of that fileβs content. Preview includes:- File name header
- First ~250px of rendered content
- Fade gradient at bottom
- Styled card with shadow
- Relative paths:
./other.md - Parent directory:
../docs/file.md - Direct filenames:
README.md
Link Clicking
External links: Open in system default browser (Tauri) or new tab (web)Table of Contents
MarkView automatically generates a table of contents in the right sidebar. Implementation: page.tsx:627-645Features
Automatic Extraction
Automatic Extraction
- Scans markdown for headings (H1-H6)
- Ignores headings inside code blocks
- Extracts heading text and level
- Generates URL-safe slugs
Slug Generation
Slug Generation
Heading text is converted to slugs:
- Convert to lowercase
- Remove markdown formatting (
*,_,~,`) - Replace non-alphanumeric with hyphens
- Remove leading/trailing hyphens
## Getting Started! β getting-startedHierarchical Display
Hierarchical Display
The sidebar shows headings with indentation based on level:
- H1: No indent
- H2: 0.75rem
- H3: 1.5rem
- And so onβ¦
Smooth Scrolling
Smooth Scrolling
Clicking a TOC link smoothly scrolls to the heading:The
rehype-slug plugin ensures all headings have matching IDs.Component Customization
MarkView customizes how certain markdown elements are rendered.Custom Code Component
Thecode component is overridden to provide enhanced code blocks:
pre wrapper is removed because CodeBlock adds its own wrapper with enhanced styling.
CSS Variables for Theming
All markdown elements use CSS custom properties for theme compatibility:--foreground: Primary text color--background: Page background--card-bg: Code blocks, tables, blockquotes--card-border: Borders and dividers--primary: Links and accents--text-secondary: Muted text--code-bg: Inline code background
Performance Optimizations
useMemo Hooks
useMemo Hooks
Expensive computations are memoized:
- Table of contents parsing (page.tsx:627)
- File filtering (page.tsx:502)
- Theme filtering (page.tsx:357)
Lazy Loading
Lazy Loading
Tauri APIs are imported dynamically:This reduces initial bundle size for the web version.
Standard Markdown Features
In addition to the enhanced features above, MarkView supports all standard markdown:- Headings: H1-H6 with
#syntax - Emphasis: italic, bold, bold italic
- Lists: Ordered and unordered, nested
- Blockquotes: With
>prefix - Horizontal rules:
---or*** - Images:
with local or remote URLs - Links:
[text](url)with support for anchors - Inline code:
`code`with backticks - Code blocks: Fenced with ``` or indented
- Escaping: Backslash escapes special characters