# Markdown Reader Premium User Manual

Welcome to the Markdown Reader Premium browser extension, developed by the DPLAY-Team. This manual provides details on all features, interaction methods, advanced configuration, and troubleshooting steps.

---

## Table of Contents
- [1. Introduction](#1-introduction)
- [2. Core Features](#2-core-features)
  - [2.1 Self-Adaptive Themes](#21-self-adaptive-themes)
  - [2.2 Dynamic Table of Contents and Scroll Spy](#22-dynamic-table-of-contents-and-scroll-spy)
  - [2.3 Code Syntax Highlighting and Contrast Controls](#23-code-syntax-highlighting-and-contrast-controls)
  - [2.4 Alert Blocks (Admonitions)](#24-alert-blocks-admonitions)
  - [2.5 Word Count and Reading Time Stats](#25-word-count-and-reading-time-stats)
  - [2.6 Built-in Document Search](#26-built-in-document-search)
  - [2.7 Multi-Page PDF Export](#27-multi-page-pdf-export)
- [3. Keyboard Shortcuts](#3-keyboard-shortcuts)
- [4. Installation Guide](#4-installation-guide)
- [5. Troubleshooting and FAQ](#5-troubleshooting-and-faq)
- [6. About DPLAY-Team](#6-about-dplay-team)

---

## 1. Introduction
Markdown Reader Premium is a high-performance extension built under the Chrome Manifest V3 standard. It intercepts plain-text Markdown (.md, .markdown, etc.) files and renders them into structured, beautiful, and interactive documents.

This extension runs completely offline. All document rendering, syntax highlighting, and statistical calculations are processed locally within your browser sandbox. No document data is ever uploaded to external servers, protecting your privacy.

---

## 2. Core Features

### 2.1 Self-Adaptive Themes
The floating toolbar in the bottom-right corner includes a theme switch button. Click it to cycle through three curated color palettes:
1. **GitHub Light**: A clean white and gray design ideal for daytime reading, equipped with light-themed code highlights.
2. **One Dark**: A dark theme designed to reduce eye strain in low-light environments, featuring syntax highlighting.
3. **Warm Sepia**: A warm paper-like beige theme, providing a comfortable reading experience for technical documentation or articles.

Your theme preference, font size, and sidebar status are automatically saved locally and applied when you load other Markdown files.

---

### 2.2 Dynamic Table of Contents and Scroll Spy
* **Sidebar Navigation**: The extension scans headers (H1 to H4) to generate a hierarchical Table of Contents (TOC) in the left panel. Click any header link to scroll smoothly to that section.
* **Scroll Spy**: The TOC active class updates dynamically as you scroll through the document, highlighting the section currently visible in your viewport.
* **Collapsible Layout**: Click the collapse arrow at the top of the sidebar to hide it. Use the floating expand arrow on the left of the screen to restore the panel.

---

### 2.3 Code Syntax Highlighting and Contrast Controls
* **Prism Syntax Highlighting**: Automatic syntax parsing for languages including C++, Java, Python, JavaScript, HTML/CSS, and Markdown.
* **High Contrast Rendering**: Code block background colors and text styles automatically adjust to match your selected theme, preventing legibility issues such as dark text on dark backgrounds.
* **One-Click Copy**: Hover over any code block to display a copy button. Click to copy the code snippet with visual feedback.

---

### 2.4 Alert Blocks (Admonitions)
Supports enhanced blockquotes for notes, tips, and warnings. Add specific markers to render them as cards:
* `> [!NOTE]`: Renders as a blue Note card for general background info.
* `> [!TIP]`: Renders as a green Tip card for best practices.
* `> [!WARNING]`: Renders as a yellow Warning card for important precautions.

---

### 2.5 Word Count and Reading Time Stats
The bottom of the left sidebar displays document statistics. It counts words in real-time and estimates the reading time based on average speeds (e.g., "1250 words | 7 min read").

---

### 2.6 Built-in Document Search
* Open the search panel by clicking the magnifying glass icon or pressing Ctrl+F (Cmd+F).
* Enter search terms to highlight matches in yellow.
* View match statistics (e.g., "3/12") in the search panel.
* Navigate matches using Enter, Shift+Enter, or the arrow buttons.

---

### 2.7 Multi-Page PDF Export
* Click the printer icon in the floating toolbar to open the print dialog.
* Select "Save as PDF" to export.
* **Print Optimization**: Sidebars, toolbars, and search panels are hidden during printing, and the text flow resets to a standard white layout to fit multi-page PDF generation without clippings.

---

## 3. Keyboard Shortcuts

| Shortcut | Action | Description |
| :---: | :--- | :--- |
| Ctrl+F / Cmd+F | Open Search Panel | Activates the search bar and focuses the input field |
| Enter | Next Match | Navigates to the next highlighted search match |
| Shift+Enter | Previous Match | Navigates to the previous highlighted search match |
| Escape | Close Search Panel | Hides the search bar and clears all highlight markers |
| Hover code block | Show Copy Button | Displays the hover copy trigger |

---

## 4. Installation Guide
To load local .md files:
1. **Unzip**: Extract `chrome-md-reader.zip` into a local directory.
2. **Load Unpacked**: Open Chrome, go to `chrome://extensions/`, enable "Developer mode", click "Load unpacked", and select your extracted directory.
3. **Allow File Access**: Click "Details" on the "Markdown Reader Premium" card, scroll down, and toggle ON "Allow access to file URLs".
4. **View**: Drag and drop any .md file into Chrome to read it.

---

## 5. Troubleshooting and FAQ

#### Q1: Local files display as plain text instead of formatted layouts?
* **Answer**: Ensure you enabled the "Allow access to file URLs" setting in Chrome extension properties. Refer to Section 4.

#### Q2: The text inside code blocks is too dark to read?
* **Answer**: Make sure you reloaded the extension with the latest stylesheet. Click the Reload icon on the extension page and refresh your Markdown tab.

#### Q3: The packaged .crx file fails to load?
* **Answer**: Chrome blocks direct installation of local .crx packages due to security policies. For local testing, always use the unzipped folder via "Load unpacked".

---

## 6. About DPLAY-Team
This extension is developed and maintained by DPLAY-Team. We focus on building clean, high-performance developer utilities.

* **Official Website**: [www.dplayteam.com](http://www.dplayteam.com)
* **Support**: Visit our site for updates and feedback channels.

*Copyright (c) 2026 DPLAY-Team. All rights reserved.*
