# pardnchiu/NanoMD > NanoMD is a lightweight pure JavaScript Markdown editor, viewer and parser with live split-screen preview, by 邱敬幃 Pardn Chiu (pardnchiu). Maintained by 邱敬幃 Pardn Chiu (pardnchiu), Pardn Co., Ltd. Source: https://github.com/pardnchiu/NanoMD Full text in one file: [English](https://nanomd.pardn.io/llms-full.txt) · [中文](https://nanomd.pardn.io/zh/llms-full.txt) ## Overview - [Overview](https://nanomd.pardn.io/index.md): NanoMD is a lightweight pure JavaScript Markdown editor, viewer and parser with live split-screen preview, by 邱敬幃 Pardn Chiu (pardnchiu). - [Getting Started](https://nanomd.pardn.io/getting-started.md): Install NanoMD from CDN, npm or ESM, build it from source, and create a first synchronized MDEditor and MDViewer pair. ## Concepts - [Architecture](https://nanomd.pardn.io/architecture.md): How NanoMD's MDEditor, MDViewer and MDParser share one transToHTML pipeline, with one overview diagram and the source layers. - [Parsing Pipeline](https://nanomd.pardn.io/parsing-pipeline.md): The five stages and 16 transform functions inside transToHTML, the placeholder mechanism, and known v1.11.6 quirks. - [Standard Mode](https://nanomd.pardn.io/standard-mode.md): Which syntax standard mode drops, which component uses which mode, and when to pass standard: false to MDParser. - [Rendering and Sync](https://nanomd.pardn.io/rendering-and-sync.md): When MDViewer re-renders, the debounce delay, post-render highlighting and Mermaid, and how wheel scroll sync works. ## Editor - [Editor Options](https://nanomd.pardn.io/editor-options.md): Every new MDEditor() option with type and default, style options, instance properties, and how options take effect. - [Formatting Methods](https://nanomd.pardn.io/editor-formatting.md): MDEditor bold, heading, list, link and image methods: insert position, selection handling, Markdown vs HTML output. - [Content and Files](https://nanomd.pardn.io/editor-content.md): Initialize, read, clear, open and export MDEditor content, and how save() combines autosave with event.save. - [Undo and Redo](https://nanomd.pardn.io/editor-history.md): What the MDEditor undo stack records, when entries are written and merged, and how undo() and redo() restore state. - [Keyboard Shortcuts](https://nanomd.pardn.io/keyboard-shortcuts.md): Every key combination MDEditor intercepts, Cmd and Ctrl handling, and what hotKey: false actually disables. - [Editor Toolbar](https://nanomd.pardn.io/editor-toolbar.md): The MDEditor floating toolbar: placement, each button, and adding an image upload button with event.upload. ## Viewer - [Viewer Options](https://nanomd.pardn.io/viewer-options.md): Every new MDViewer() option, its methods and properties, binding an editor, and using the viewer standalone. - [Hashtag Links](https://nanomd.pardn.io/hashtag-links.md): Turn #tag text into links with MDViewer hashtag.path and target, plus the character and escape rules. ## Parser - [MDParser](https://nanomd.pardn.io/parser-api.md): MDParser constructor options, parse() input handling, differences from MDViewer, and browser environment needs. ## Markdown Syntax - [Inline Syntax](https://nanomd.pardn.io/syntax-inline.md): Bold, italic, strikethrough, marker, sub/superscript and inline code in NanoMD, plus escapes, line breaks and raw HTML. - [Headings, Rules and Blockquotes](https://nanomd.pardn.io/syntax-blocks.md): ATX and setext headings, horizontal rules, nested blockquotes and GitHub-style [!NOTE] alerts in NanoMD Markdown. - [Lists and Tables](https://nanomd.pardn.io/syntax-lists-tables.md): Ordered and unordered lists, 4-space nesting, read-only checkboxes, and tables with column alignment in NanoMD. - [Code and Mermaid](https://nanomd.pardn.io/syntax-code.md): Fenced and indented code blocks, the language list, code-prettify highlighting, copy buttons and Mermaid diagrams. - [Links and Media](https://nanomd.pardn.io/syntax-links-media.md): Links, bare URLs, email, image size and float suffix, mp4/mov video, and YouTube and Vimeo embeds in NanoMD. ## Customization - [Theming](https://nanomd.pardn.io/theming.md): How NanoMD picks light or dark mode, what changeMode() writes, the bundled stylesheets, and selectors to override. - [Runtime Dependencies](https://nanomd.pardn.io/runtime-dependencies.md): CDN resources NanoMD injects on load, failure behavior offline, a CSP allow-list, and the global names it defines. ## Reference - [Security](https://nanomd.pardn.io/security.md): NanoMD does not sanitize HTML: XSS risk with untrusted Markdown, outbound requests, and unpinned third-party scripts. - [Deprecations](https://nanomd.pardn.io/deprecations.md): Legacy PDMarkdownEditor/PDMarkdownViewer aliases, old MDEditor methods and top-level options, and their replacements. ## 中文文件 - [總覽](https://nanomd.pardn.io/zh/index.md): NanoMD 是以原生 JavaScript 打造的輕量 Markdown 編輯器、預覽器與解析器,支援分屏即時預覽,作者邱敬幃 Pardn Chiu。 - [快速開始](https://nanomd.pardn.io/zh/getting-started.md): 從 CDN、npm 或 ESM 安裝 NanoMD、從原始碼建置,並建立第一組同步的 MDEditor 與 MDViewer。 - [架構](https://nanomd.pardn.io/zh/architecture.md): MDEditor、MDViewer、MDParser 如何共用 transToHTML 轉換管線,附一張概覽圖與原始碼分層。 - [轉換管線](https://nanomd.pardn.io/zh/parsing-pipeline.md): transToHTML 的五個階段與 16 個轉換函式順序、佔位符機制,以及 v1.11.6 的已知限制。 - [標準模式](https://nanomd.pardn.io/zh/standard-mode.md): 標準模式略過哪些語法、各元件使用哪種模式,以及何時要對 MDParser 傳 standard: false。 - [渲染與同步](https://nanomd.pardn.io/zh/rendering-and-sync.md): MDViewer 何時重新渲染、debounce 延遲、渲染後的高亮與 Mermaid,以及滾輪捲動同步的限制。 - [編輯器選項](https://nanomd.pardn.io/zh/editor-options.md): new MDEditor() 每個選項的型別與預設值、樣式選項、實例屬性與實際生效方式。 - [格式化方法](https://nanomd.pardn.io/zh/editor-formatting.md): MDEditor 粗體、標題、列表、連結、圖片方法的插入位置、選取處理,與 Markdown/HTML 輸出差異。 - [內容與檔案](https://nanomd.pardn.io/zh/editor-content.md): MDEditor 內容的初始化、讀取、清空、開檔與匯出,以及 save() 如何結合 autosave 與 event.save。 - [復原與重做](https://nanomd.pardn.io/zh/editor-history.md): MDEditor 復原堆疊記錄什麼、何時寫入與合併,以及 undo() 與 redo() 如何還原內容與游標。 - [快捷鍵](https://nanomd.pardn.io/zh/keyboard-shortcuts.md): MDEditor 攔截的所有按鍵組合、Cmd 與 Ctrl 的處理,以及 hotKey: false 實際停用的範圍。 - [編輯器工具列](https://nanomd.pardn.io/zh/editor-toolbar.md): MDEditor 浮動工具列的顯示位置、每個按鈕,以及用 event.upload 加入圖片上傳按鈕。 - [預覽器選項](https://nanomd.pardn.io/zh/viewer-options.md): new MDViewer() 的選項、方法與屬性,綁定與解除編輯器,以及單獨使用預覽器。 - [Hashtag 連結](https://nanomd.pardn.io/zh/hashtag-links.md): 以 MDViewer 的 hashtag.path 與 target 把 #tag 轉成連結,以及字元範圍與跳脫規則。 - [MDParser](https://nanomd.pardn.io/zh/parser-api.md): MDParser 的建構選項、parse() 輸入處理、與 MDViewer 的差異,以及瀏覽器環境需求。 - [行內語法](https://nanomd.pardn.io/zh/syntax-inline.md): NanoMD 的粗體、斜體、刪除線、標記、上下標與行內 code,以及跳脫、換行與原始 HTML。 - [標題、分隔線與引用](https://nanomd.pardn.io/zh/syntax-blocks.md): NanoMD 的 ATX 與 setext 標題、水平分隔線、巢狀引用與 GitHub 樣式 [!NOTE] 提示框。 - [列表與表格](https://nanomd.pardn.io/zh/syntax-lists-tables.md): NanoMD 的有序與無序列表、4 空白巢狀、唯讀 checkbox,以及表格與欄位對齊。 - [程式碼與 Mermaid](https://nanomd.pardn.io/zh/syntax-code.md): fenced 與縮排程式碼區塊、語言清單、code-prettify 高亮、複製按鈕與 Mermaid 圖表。 - [連結與媒體](https://nanomd.pardn.io/zh/syntax-links-media.md): NanoMD 的連結、自動網址、Email、圖片尺寸與浮動、mp4/mov 影片,以及 YouTube 與 Vimeo 嵌入。 - [主題與樣式](https://nanomd.pardn.io/zh/theming.md): NanoMD 如何決定深淺色、changeMode() 寫入什麼、內建樣式檔,以及可覆寫的選擇器。 - [執行期依賴](https://nanomd.pardn.io/zh/runtime-dependencies.md): NanoMD 載入時注入的 CDN 資源、離線時的行為、CSP 白名單,以及定義的全域名稱。 - [安全性](https://nanomd.pardn.io/zh/security.md): NanoMD 不過濾 HTML:處理不受信任 Markdown 的 XSS 風險、外部請求與未固定版本的第三方腳本。 - [已棄用 API](https://nanomd.pardn.io/zh/deprecations.md): 舊的 PDMarkdownEditor/PDMarkdownViewer 別名、MDEditor 舊方法與頂層選項,以及對應的新寫法。 ## Optional - [Release Notes](https://nanomd.pardn.io/released/index.md): pardnchiu/NanoMD changelog by version