+
+```
+
+## Notes
+
+- Use `` marker in the first line of an HTML code block
+- Applets have access to the `ctx` object for Yank Note API interaction
+- Applets run in a sandboxed iframe environment
+- Both HTML and JavaScript can be used within applets
diff --git a/test/md/attributes.md b/test/md/attributes.md
new file mode 100644
index 00000000..9664f874
--- /dev/null
+++ b/test/md/attributes.md
@@ -0,0 +1,97 @@
+# Element Attributes Test
+
+This document tests the element attributes syntax supported by Yank Note via markdown-it-attributes.
+
+## Basic Attributes
+
+### Class Attribute
+
+This paragraph has a custom class.{.custom-class}
+
+**Bold text with class**{.highlight}
+
+### Style Attribute
+
+**Red colored text**{style="color: red;"}
+
+*Blue italic text*{style="color: blue; font-size: 1.2em;"}
+
+### ID Attribute
+
+#### Section with ID {#my-section}
+
+You can link to this section using `#my-section`.
+
+### Multiple Attributes
+
+**Styled text**{.custom-class style="color: green; font-weight: bold;" id="styled-element"}
+
+## Built-in CSS Classes
+
+### Inline Display
+
+{.inline}
+
+### White Background
+
+{.bgw}
+
+### Text Alignment
+
+This is centered text.{.text-center}
+
+This is right-aligned text.{.text-right}
+
+This is left-aligned text.{.text-left}
+
+### Border
+
+{.with-border}
+
+### Print Control
+
+This content will not appear in print/PDF.{.skip-print}
+
+This content will not appear in HTML export.{.skip-export}
+
+Start a new page before this in print.{.new-page}
+
+Avoid breaking this across pages.{.avoid-page-break}
+
+### Brightness
+
+This image has reduced brightness in dark mode.{.reduce-brightness}
+
+### Copy Text
+
+Click to copy this text.{.copy-inner-text}
+
+## Attributes on Different Elements
+
+### On Headings
+
+#### Custom Heading {.text-center style="color: purple;"}
+
+### On Links
+
+[Styled link](https://example.com){style="color: orange; text-decoration: none;"}
+
+### On Images
+
+{style="width: 100px; border-radius: 8px;"}
+
+### On Code
+
+`highlighted code`{style="background: yellow; color: black;"}
+
+### On Blockquotes
+
+> This blockquote has a custom style.
+{style="border-left-color: green;"}
+
+### On Lists
+
+- Item 1
+- Item 2
+- Item 3
+{.custom-list}
diff --git a/test/md/basic-syntax.md b/test/md/basic-syntax.md
new file mode 100644
index 00000000..1b6e0cc2
--- /dev/null
+++ b/test/md/basic-syntax.md
@@ -0,0 +1,150 @@
+# Basic Markdown Syntax Test
+
+This document tests all basic markdown syntax features supported by Yank Note.
+
+## Headings
+
+# Heading 1
+## Heading 2
+### Heading 3
+#### Heading 4
+##### Heading 5
+###### Heading 6
+
+## Paragraphs
+
+This is a paragraph. It contains multiple sentences.
+This sentence is on a new line but in the same paragraph (with `breaks: true`, it renders as a line break).
+
+This is another paragraph separated by a blank line.
+
+## Emphasis
+
+*italic text* and _also italic_
+
+**bold text** and __also bold__
+
+***bold and italic*** and ___also bold and italic___
+
+~~strikethrough text~~
+
+## Links
+
+[Inline link](https://example.com)
+
+[Link with title](https://example.com "Example Site")
+
+[Reference link][ref1]
+
+[ref1]: https://example.com "Reference Link"
+
+Auto-linked URL: https://example.com (with `linkify: true`)
+
+## Images
+
+
+
+![Reference image][img1]
+
+[img1]: https://via.placeholder.com/100 "Reference Image"
+
+## Blockquotes
+
+> This is a blockquote.
+>
+> It can span multiple paragraphs.
+
+> Nested blockquotes:
+>
+> > This is a nested blockquote.
+> >
+> > > And even deeper.
+
+## Lists
+
+### Unordered List
+
+- Item 1
+- Item 2
+ - Sub-item 2.1
+ - Sub-item 2.2
+ - Sub-sub-item 2.2.1
+- Item 3
+
+* Alternative bullet style
+* Item B
+
++ Another bullet style
++ Item C
+
+### Ordered List
+
+1. First item
+2. Second item
+ 1. Sub-item 2.1
+ 2. Sub-item 2.2
+3. Third item
+
+### Mixed List
+
+1. Ordered item
+ - Unordered sub-item
+ - Another sub-item
+2. Another ordered item
+
+## Horizontal Rules
+
+---
+
+***
+
+___
+
+## Inline Code
+
+Use `console.log()` to print output.
+
+Inline code with backticks: ``code with ` inside``.
+
+## Code Blocks
+
+Indented code block:
+
+ function hello() {
+ console.log("Hello, World!");
+ }
+
+Fenced code block:
+
+```javascript
+function greet(name) {
+ return `Hello, ${name}!`;
+}
+```
+
+```python
+def greet(name):
+ return f"Hello, {name}!"
+```
+
+```
+Plain code block without language
+```
+
+## Escape Characters
+
+\*Not italic\*
+
+\# Not a heading
+
+\[Not a link\]
+
+\`Not inline code\`
+
+## Line Breaks
+
+First line with two trailing spaces
+Second line (hard break)
+
+First line with backslash\
+Second line (hard break)
diff --git a/test/md/code-features.md b/test/md/code-features.md
new file mode 100644
index 00000000..fb24f993
--- /dev/null
+++ b/test/md/code-features.md
@@ -0,0 +1,194 @@
+# Code Features Test
+
+This document tests code-related features in Yank Note: highlighting, running, copying, and wrapping.
+
+## Syntax Highlighting
+
+### JavaScript
+
+```javascript
+class Calculator {
+ constructor() {
+ this.result = 0;
+ }
+
+ add(value) {
+ this.result += value;
+ return this;
+ }
+
+ multiply(value) {
+ this.result *= value;
+ return this;
+ }
+
+ getResult() {
+ return this.result;
+ }
+}
+
+const calc = new Calculator();
+console.log(calc.add(5).multiply(3).getResult()); // 15
+```
+
+### TypeScript
+
+```typescript
+interface User {
+ id: number;
+ name: string;
+ email: string;
+ roles: string[];
+}
+
+function greetUser(user: User): string {
+ return `Hello, ${user.name}! You have ${user.roles.length} roles.`;
+}
+
+const user: User = {
+ id: 1,
+ name: "Alice",
+ email: "alice@example.com",
+ roles: ["admin", "editor"],
+};
+```
+
+### HTML
+
+```html
+
+
+
+
+ Test Page
+
+
+
+
Hello World
+
This is a test page.
+
+
+```
+
+### Rust
+
+```rust
+fn fibonacci(n: u32) -> u64 {
+ match n {
+ 0 => 0,
+ 1 => 1,
+ _ => fibonacci(n - 1) + fibonacci(n - 2),
+ }
+}
+
+fn main() {
+ for i in 0..10 {
+ println!("fib({}) = {}", i, fibonacci(i));
+ }
+}
+```
+
+## Code Execution (`--run--`)
+
+### JavaScript Execution
+
+```js
+// --run--
+const items = ['apple', 'banana', 'cherry'];
+items.forEach((item, index) => {
+ console.log(`${index + 1}. ${item}`);
+});
+```
+
+### JavaScript with HTML Output
+
+```js
+// --run-- --output-html--
+const colors = ['red', 'green', 'blue'];
+const html = colors.map(c =>
+ `${c}`
+).join(' | ');
+output = html;
+```
+
+### Node.js Execution
+
+```js
+// --run-- node
+const os = require('os');
+console.log('Platform:', os.platform());
+console.log('Architecture:', os.arch());
+console.log('CPUs:', os.cpus().length);
+```
+
+### Python Execution
+
+```python
+# --run--
+import math
+
+for i in range(1, 6):
+ print(f"sqrt({i}) = {math.sqrt(i):.4f}")
+```
+
+### Shell Execution
+
+```bash
+# --run--
+echo "Current date: $(date)"
+echo "Current directory: $(pwd)"
+echo "User: $(whoami)"
+```
+
+### Custom Compile Command (C)
+
+```c
+// --run-- gcc $tmpFile.c -o $tmpFile.out && $tmpFile.out
+#include
+
+int main() {
+ printf("Hello from C!\n");
+ for (int i = 1; i <= 5; i++) {
+ printf("Count: %d\n", i);
+ }
+ return 0;
+}
+```
+
+## Code Copy
+
+All code blocks support a copy button on hover. The language label is displayed in the top-right corner.
+
+Inline code also supports `Ctrl/Cmd + Click` to copy: `npm install yank-note`
+
+## Code Wrapping
+
+Code wrapping can be enabled with `wrap-code: true` in front matter or render settings.
+
+```text
+This is a very long line that should demonstrate code wrapping behavior when the wrap-code option is enabled. Without wrapping, this line will overflow and require horizontal scrolling. With wrapping enabled, it should break into multiple lines.
+```
+
+## Line Numbers
+
+Code blocks automatically display line numbers with a sticky left panel:
+
+```javascript
+// Line 1
+// Line 2
+// Line 3
+// Line 4
+// Line 5
+// Line 6
+// Line 7
+// Line 8
+// Line 9
+// Line 10
+// Line 11
+// Line 12
+// Line 13
+// Line 14
+// Line 15
+```
diff --git a/test/md/code-line-highlighting.md b/test/md/code-line-highlighting.md
new file mode 100644
index 00000000..c4225dd3
--- /dev/null
+++ b/test/md/code-line-highlighting.md
@@ -0,0 +1,75 @@
+# Code Line Highlighting Test
+
+This document tests code line highlighting in Yank Note.
+
+> **Note**: Requires the `@yank-note/extension-code-line-highlighting` extension.
+
+## Highlight Specific Lines
+
+```js {.h:1,4-6,11}
+// Line 1 - highlighted
+const express = require('express');
+const app = express();
+// Line 4 - highlighted
+// Line 5 - highlighted
+// Line 6 - highlighted
+const PORT = 3000;
+
+app.get('/', (req, res) => {
+ res.send('Hello World!');
+ // Line 11 - highlighted
+});
+
+app.listen(PORT);
+```
+
+## Highlight with Data Attribute
+
+```python {data-line-numbers="2,5-7"}
+# Line 1
+import os # Line 2 - highlighted
+import sys
+
+def main(): # Line 5 - highlighted
+ print("Hello") # Line 6 - highlighted
+ return 0 # Line 7 - highlighted
+
+if __name__ == "__main__":
+ main()
+```
+
+## Highlight a Range
+
+```typescript {.h:3-8}
+class App {
+ private name: string;
+ // Lines 3-8 highlighted
+ constructor(name: string) {
+ this.name = name;
+ }
+ getName(): string {
+ return this.name;
+ }
+ // Not highlighted
+ run(): void {
+ console.log(this.getName());
+ }
+}
+```
+
+## Highlight Single Line
+
+```rust {.h:3}
+fn main() {
+ let x = 5;
+ let y = x * 2; // This line is highlighted
+ println!("y = {}", y);
+}
+```
+
+## Notes
+
+- Use `{.h:line-numbers}` syntax after the language identifier
+- Alternatively use `{data-line-numbers="..."}` format
+- Supports single lines (`1`), ranges (`4-6`), and combinations (`1,4-6,11`)
+- Highlighted lines have a distinct background color
diff --git a/test/md/containers.md b/test/md/containers.md
new file mode 100644
index 00000000..e8e80a68
--- /dev/null
+++ b/test/md/containers.md
@@ -0,0 +1,147 @@
+# Container Blocks Test
+
+This document tests all container block types supported by Yank Note.
+
+## Tip Container
+
+::: tip
+This is a tip container. Use it for helpful advice.
+:::
+
+::: tip Custom Tip Title
+This tip has a custom title.
+:::
+
+## Warning Container
+
+::: warning
+This is a warning container. Use it for important notices.
+:::
+
+::: warning Caution
+Be careful with this operation!
+:::
+
+## Danger Container
+
+::: danger
+This is a danger container. Use it for critical warnings.
+:::
+
+::: danger STOP
+Do not proceed without backup!
+:::
+
+## Details (Collapsible) Container
+
+::: details Click to expand
+This content is hidden by default and can be revealed by clicking.
+
+- Item 1
+- Item 2
+- Item 3
+:::
+
+::: details Show Code Example
+```javascript
+function example() {
+ return "Hidden code";
+}
+```
+:::
+
+## Code Group Container
+
+::: code-group
+```javascript
+// JavaScript
+function hello() {
+ console.log("Hello!");
+}
+```
+
+```python
+# Python
+def hello():
+ print("Hello!")
+```
+
+```go
+// Go
+package main
+
+import "fmt"
+
+func main() {
+ fmt.Println("Hello!")
+}
+```
+:::
+
+## Group Container
+
+::: group
+::: group-item Tab 1
+Content for tab 1.
+:::
+
+::: group-item Tab 2
+Content for tab 2.
+:::
+
+::: group-item Tab 3
+Content for tab 3.
+:::
+:::
+
+## Row and Column Layout
+
+::: row
+::: col
+**Column 1**
+
+This is the first column content.
+:::
+
+::: col
+**Column 2**
+
+This is the second column content.
+:::
+
+::: col
+**Column 3**
+
+This is the third column content.
+:::
+:::
+
+## Section Container
+
+::: section
+This is a section container. It groups content together.
+
+### Section Heading
+
+Section content with various elements.
+:::
+
+## Div Container
+
+::: div {style="background: #f0f0f0; padding: 1em; border-radius: 8px;"}
+This is a div container with custom styling.
+:::
+
+## Nested Containers
+
+::: tip Nested Example
+This tip contains a details block:
+
+::: details Nested Details
+This is nested inside a tip container.
+
+::: warning Deep Nesting
+This is a warning inside details inside a tip!
+:::
+:::
+:::
diff --git a/test/md/drawio.md b/test/md/drawio.md
new file mode 100644
index 00000000..c503982c
--- /dev/null
+++ b/test/md/drawio.md
@@ -0,0 +1,47 @@
+# Draw.io Test
+
+This document tests Draw.io diagram integration in Yank Note.
+
+> **Note**: Requires the `@yank-note/extension-drawio` extension.
+
+## Link Syntax
+
+Use a link with `link-type="drawio"` attribute to embed a Draw.io file:
+
+[Architecture Diagram](./example.drawio){link-type="drawio"}
+
+### With Page Selection
+
+[Page 1](./example.drawio){link-type="drawio" page="0"}
+
+[Page 2](./example.drawio){link-type="drawio" page="1"}
+
+## Inline XML Syntax
+
+Draw.io diagrams can also be embedded as inline XML in a code block:
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+## Notes
+
+- Draw.io files (`.drawio`) are XML-based diagram files
+- Supports multi-page diagrams via the `page` attribute
+- Diagrams can be edited inline in the Yank Note editor
+- Both file reference and inline XML approaches are supported
diff --git a/test/md/echarts.md b/test/md/echarts.md
new file mode 100644
index 00000000..bd1457c4
--- /dev/null
+++ b/test/md/echarts.md
@@ -0,0 +1,127 @@
+# ECharts Test
+
+This document tests ECharts chart rendering in Yank Note.
+
+> **Note**: Requires the `@yank-note/extension-echarts` extension.
+
+## Line Chart
+
+```js
+// --echarts--
+const option = {
+ title: { text: 'Monthly Sales' },
+ tooltip: { trigger: 'axis' },
+ xAxis: {
+ type: 'category',
+ data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
+ },
+ yAxis: { type: 'value' },
+ series: [{
+ data: [820, 932, 901, 1034, 1290, 1330],
+ type: 'line',
+ smooth: true
+ }]
+}
+chart.setOption(option, true)
+```
+
+## Bar Chart
+
+```js
+// --echarts--
+const option = {
+ title: { text: 'Weekly Report' },
+ tooltip: {},
+ xAxis: {
+ type: 'category',
+ data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
+ },
+ yAxis: { type: 'value' },
+ series: [{
+ data: [120, 200, 150, 80, 70, 110, 130],
+ type: 'bar',
+ itemStyle: { color: '#5470c6' }
+ }]
+}
+chart.setOption(option, true)
+```
+
+## Pie Chart
+
+```js
+// --echarts--
+const option = {
+ title: {
+ text: 'Technology Stack',
+ left: 'center'
+ },
+ tooltip: { trigger: 'item' },
+ series: [{
+ type: 'pie',
+ radius: '60%',
+ data: [
+ { value: 40, name: 'JavaScript' },
+ { value: 25, name: 'TypeScript' },
+ { value: 15, name: 'Vue.js' },
+ { value: 12, name: 'Node.js' },
+ { value: 8, name: 'Other' }
+ ]
+ }]
+}
+chart.setOption(option, true)
+```
+
+## Scatter Chart
+
+```js
+// --echarts--
+const data = [];
+for (let i = 0; i < 50; i++) {
+ data.push([Math.random() * 100, Math.random() * 100]);
+}
+const option = {
+ title: { text: 'Random Distribution' },
+ xAxis: { type: 'value' },
+ yAxis: { type: 'value' },
+ series: [{
+ type: 'scatter',
+ data: data,
+ symbolSize: 8
+ }]
+}
+chart.setOption(option, true)
+```
+
+## Radar Chart
+
+```js
+// --echarts--
+const option = {
+ title: { text: 'Skill Assessment' },
+ radar: {
+ indicator: [
+ { name: 'JavaScript', max: 100 },
+ { name: 'CSS', max: 100 },
+ { name: 'HTML', max: 100 },
+ { name: 'Node.js', max: 100 },
+ { name: 'Vue.js', max: 100 },
+ { name: 'React', max: 100 }
+ ]
+ },
+ series: [{
+ type: 'radar',
+ data: [{
+ value: [90, 85, 95, 80, 88, 70],
+ name: 'Developer A'
+ }]
+ }]
+}
+chart.setOption(option, true)
+```
+
+## Notes
+
+- Use `// --echarts--` marker in the first line of a JavaScript code block
+- The `chart` object is available for calling `setOption`
+- All ECharts configuration options are supported
+- Charts are interactive with tooltips, zoom, etc.
diff --git a/test/md/emoji.md b/test/md/emoji.md
new file mode 100644
index 00000000..07f53855
--- /dev/null
+++ b/test/md/emoji.md
@@ -0,0 +1,59 @@
+# Emoji Test
+
+This document tests emoji support in Yank Note via markdown-it-emoji.
+
+## Emoji Shortcodes
+
+:smile: :laughing: :blush: :heart_eyes: :star:
+
+:thumbsup: :thumbsdown: :clap: :wave: :pray:
+
+:rocket: :fire: :sparkles: :tada: :confetti_ball:
+
+:warning: :exclamation: :question: :bulb: :mag:
+
+:white_check_mark: :x: :heavy_check_mark: :heavy_multiplication_x:
+
+:heart: :broken_heart: :blue_heart: :green_heart: :yellow_heart:
+
+:coffee: :pizza: :hamburger: :apple: :grapes:
+
+:sunny: :cloud: :umbrella: :snowflake: :zap:
+
+## Emoticons
+
+Classic emoticons that are converted to emoji:
+
+:) :( ;) :D :P
+
+:-) :-( ;-) :-D :-P
+
+8-) :O :/
+
+## Emoji in Context
+
+:rocket: This project is taking off!
+
+:bulb: Here's an idea worth considering.
+
+:warning: Be careful with this operation.
+
+:tada: Congratulations on the achievement!
+
+:memo: Don't forget to document your changes.
+
+## Emoji in Lists
+
+- :white_check_mark: Task completed
+- :x: Task failed
+- :hourglass: Task in progress
+- :star: Starred item
+
+## Emoji in Tables
+
+| Status | Icon | Meaning |
+|--------|------|---------|
+| Success | :white_check_mark: | Operation succeeded |
+| Failure | :x: | Operation failed |
+| Warning | :warning: | Needs attention |
+| Info | :bulb: | Informational |
diff --git a/test/md/extended-syntax.md b/test/md/extended-syntax.md
new file mode 100644
index 00000000..31fcb961
--- /dev/null
+++ b/test/md/extended-syntax.md
@@ -0,0 +1,94 @@
+# Extended Markdown Syntax Test
+
+This document tests extended markdown syntax features supported by Yank Note.
+
+## Tables
+
+### Basic Table
+
+| Header 1 | Header 2 | Header 3 |
+|----------|----------|----------|
+| Cell 1 | Cell 2 | Cell 3 |
+| Cell 4 | Cell 5 | Cell 6 |
+| Cell 7 | Cell 8 | Cell 9 |
+
+### Alignment
+
+| Left Aligned | Center Aligned | Right Aligned |
+|:------------|:-------------:|-------------:|
+| Left | Center | Right |
+| Data 1 | Data 2 | Data 3 |
+
+### Table with Inline Formatting
+
+| Feature | Syntax | Result |
+|------------|-------------------|----------------|
+| Bold | `**bold**` | **bold** |
+| Italic | `*italic*` | *italic* |
+| Code | `` `code` `` | `code` |
+| Link | `[link](url)` | [link](#) |
+| Strikethrough | `~~text~~` | ~~text~~ |
+
+## Task Lists
+
+- [ ] Unchecked task
+- [x] Checked task
+- [X] Also checked task (uppercase X)
+- [ ] Another unchecked task
+ - [ ] Nested unchecked
+ - [x] Nested checked
+
+## Definition Lists
+
+Term 1
+: Definition for term 1
+
+Term 2
+: Definition A for term 2
+: Definition B for term 2
+
+## Fenced Code Blocks with Language
+
+```json
+{
+ "name": "yank-note",
+ "version": "3.0.0",
+ "description": "A markdown editor"
+}
+```
+
+```yaml
+name: Yank Note
+features:
+ - markdown
+ - diagrams
+ - macros
+```
+
+```sql
+SELECT * FROM users
+WHERE active = true
+ORDER BY created_at DESC;
+```
+
+```css
+.container {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+```
+
+```bash
+#!/bin/bash
+echo "Hello, World!"
+for i in {1..5}; do
+ echo "Count: $i"
+done
+```
+
+```diff
+- old line
++ new line
+ unchanged line
+```
diff --git a/test/md/footnotes.md b/test/md/footnotes.md
new file mode 100644
index 00000000..92c464fc
--- /dev/null
+++ b/test/md/footnotes.md
@@ -0,0 +1,53 @@
+# Footnotes Test
+
+This document tests footnote syntax supported by Yank Note.
+
+## Basic Footnotes
+
+This is a sentence with a footnote[^1].
+
+Another sentence with a different footnote[^2].
+
+[^1]: This is the first footnote content.
+[^2]: This is the second footnote content.
+
+## Named Footnotes
+
+Yank Note supports named footnotes[^note1] as well as numeric ones[^note2].
+
+[^note1]: Named footnotes use descriptive identifiers.
+[^note2]: They work the same way as numeric footnotes.
+
+## Multi-line Footnotes
+
+This references a longer footnote[^long].
+
+[^long]: This is a longer footnote that spans
+ multiple lines. Each continuation line must be
+ indented with at least 4 spaces or 1 tab.
+
+ It can even contain multiple paragraphs.
+
+## Footnotes with Formatting
+
+Check this footnote with formatting[^formatted].
+
+[^formatted]: This footnote contains **bold**, *italic*, and `code` formatting.
+
+## Multiple References
+
+The same footnote can be referenced multiple times in the text[^shared]. See the previous reference[^shared] again.
+
+[^shared]: This footnote is referenced multiple times in the document.
+
+## Footnotes in Lists
+
+- Item with footnote[^list1]
+- Another item[^list2]
+
+[^list1]: Footnote from a list item.
+[^list2]: Another footnote from a list item.
+
+## Inline Footnote
+
+This sentence has an inline footnote^[This is an inline footnote that doesn't need a separate definition.].
diff --git a/test/md/front-matter.md b/test/md/front-matter.md
new file mode 100644
index 00000000..68c11a17
--- /dev/null
+++ b/test/md/front-matter.md
@@ -0,0 +1,102 @@
+---
+headingNumber: true
+enableMacro: true
+define:
+ --APP_NAME--: Yank Note
+ --APP_VERSION--: 3.x
+tags:
+ - test
+ - front-matter
+ - yank-note
+mdOptions:
+ html: true
+ breaks: true
+ linkify: true
+ typographer: false
+katex: {}
+render:
+ md-html: true
+ md-breaks: true
+ md-linkify: true
+ md-typographer: false
+ md-sup: true
+ md-sub: true
+ md-wiki-links: true
+ md-hash-tags: true
+ multimd-multiline: true
+ multimd-rowspan: true
+ multimd-headerless: false
+ multimd-multibody: false
+ list-collapsible: true
+ wrap-code: false
+---
+
+# Front Matter Test
+
+This document tests the YAML front matter configuration supported by Yank Note.
+
+## Front Matter Options Explained
+
+The front matter above configures the following:
+
+### `headingNumber`
+
+Enables automatic heading numbering (CSS counter based). Headings h2-h6 will be numbered.
+
+### `enableMacro`
+
+Enables macro replacement with `[= expression =]` syntax.
+
+### `define`
+
+Defines text replacement variables:
+- `--APP_NAME--` will be replaced with "Yank Note"
+- `--APP_VERSION--` will be replaced with "3.x"
+
+Example: --APP_NAME-- version --APP_VERSION--
+
+### `tags`
+
+Document tags for organization and search.
+
+### `mdOptions`
+
+Markdown-it configuration options:
+- `html: true` — Allow raw HTML tags
+- `breaks: true` — Convert newlines to ` ` tags
+- `linkify: true` — Auto-detect and link URLs
+- `typographer: false` — Disable smart quotes and typographic replacements
+
+### `katex`
+
+KaTeX rendering options (empty object uses defaults).
+
+### `render`
+
+Fine-grained control over rendering features:
+- `md-html` — HTML rendering
+- `md-breaks` — Line break handling
+- `md-linkify` — URL auto-linking
+- `md-typographer` — Typography processing
+- `md-sup` — Superscript support
+- `md-sub` — Subscript support
+- `md-wiki-links` — Wiki-style linking
+- `md-hash-tags` — Hashtag support
+- `multimd-multiline` — Multi-line table cells
+- `multimd-rowspan` — Table row spanning
+- `list-collapsible` — Collapsible list items
+- `wrap-code` — Code block word wrapping
+
+## Verify Front Matter Effects
+
+### Heading Numbering
+
+All headings in this document should be automatically numbered.
+
+#### Sub-heading Example
+
+##### Deeper Heading
+
+### Variable Replacement
+
+The app name is --APP_NAME-- and the version is --APP_VERSION--.
diff --git a/test/md/github-alerts.md b/test/md/github-alerts.md
new file mode 100644
index 00000000..fd99587a
--- /dev/null
+++ b/test/md/github-alerts.md
@@ -0,0 +1,56 @@
+# GitHub Alerts Test
+
+This document tests GitHub-style alert syntax supported by Yank Note.
+
+## Note Alert
+
+> [!NOTE]
+> Useful information that users should know, even when skimming content.
+
+## Tip Alert
+
+> [!TIP]
+> Helpful advice for doing things better or more easily.
+
+## Important Alert
+
+> [!IMPORTANT]
+> Key information users need to know to achieve their goal.
+
+## Warning Alert
+
+> [!WARNING]
+> Urgent info that needs immediate user attention to avoid problems.
+
+## Caution Alert
+
+> [!CAUTION]
+> Advises about risks or negative outcomes of certain actions.
+
+## Alerts with Rich Content
+
+> [!NOTE]
+> This alert contains **bold**, *italic*, and `code` formatting.
+>
+> It can also contain:
+> - List item 1
+> - List item 2
+>
+> And even [links](https://example.com).
+
+> [!WARNING]
+> ```javascript
+> // Code blocks work inside alerts too
+> console.warn("Be careful!");
+> ```
+
+## Multiple Alerts
+
+> [!TIP]
+> First tip about the feature.
+
+> [!WARNING]
+> Important warning about the same feature.
+
+> [!NOTE]
+> Additional notes to consider.
diff --git a/test/md/hashtags.md b/test/md/hashtags.md
new file mode 100644
index 00000000..26f39f3d
--- /dev/null
+++ b/test/md/hashtags.md
@@ -0,0 +1,46 @@
+# Hashtags Test
+
+This document tests the hashtag/tag syntax supported by Yank Note.
+
+## Basic Hashtags
+
+#YankNote
+
+#Markdown
+
+#Test
+
+## Hashtags with Special Characters
+
+#my-tag
+
+#my_tag
+
+#tag/subtag
+
+## Chinese Hashtags
+
+#笔记
+
+#测试标签
+
+#Yank笔记
+
+## Hashtags in Context
+
+This is a paragraph with a #hashtag in the middle.
+
+Multiple tags: #tag1 #tag2 #tag3
+
+## Hashtags in Lists
+
+- #feature1 First feature
+- #feature2 Second feature
+- #bug Fix for a bug
+
+## Notes
+
+- Hashtags must be preceded by whitespace or be at the start of a line
+- Supported characters: alphanumeric, Chinese characters, `_`, `/`, `-`
+- A `#` immediately following text (like C#) is NOT treated as a hashtag
+- Example of non-hashtag: This is C# language (no space before #)
diff --git a/test/md/heading-number.md b/test/md/heading-number.md
new file mode 100644
index 00000000..082aacf2
--- /dev/null
+++ b/test/md/heading-number.md
@@ -0,0 +1,84 @@
+---
+headingNumber: true
+---
+
+# Heading Numbering Test
+
+This document tests automatic heading numbering in Yank Note.
+
+> **Note**: Enable heading numbering by setting `headingNumber: true` in front matter.
+
+## First Section
+
+Content of the first section.
+
+### Sub-section A
+
+Content of sub-section A.
+
+### Sub-section B
+
+Content of sub-section B.
+
+#### Detail B.1
+
+Detail content.
+
+#### Detail B.2
+
+Detail content.
+
+##### Deep Detail B.2.1
+
+Deep content.
+
+## Second Section
+
+Content of the second section.
+
+### Sub-section A
+
+Content.
+
+### Sub-section B
+
+Content.
+
+### Sub-section C
+
+Content.
+
+#### Detail C.1
+
+Content.
+
+## Third Section
+
+Content of the third section.
+
+### Sub-section A
+
+Content.
+
+#### Detail A.1
+
+Content.
+
+#### Detail A.2
+
+Content.
+
+##### Deep Detail A.2.1
+
+Content.
+
+###### Deepest Detail A.2.1.1
+
+Content.
+
+## Numbering Notes
+
+- Heading numbering uses CSS counters for h2 through h6
+- h1 is not numbered (used as document title)
+- Numbering resets appropriately for each level
+- The format is: `2.`, `2.1.`, `2.1.1.`, etc.
diff --git a/test/md/html.md b/test/md/html.md
new file mode 100644
index 00000000..b6626f64
--- /dev/null
+++ b/test/md/html.md
@@ -0,0 +1,118 @@
+# HTML Support Test
+
+This document tests raw HTML rendering in Yank Note.
+
+> **Note**: HTML support requires `html: true` in mdOptions (enabled by default).
+
+## Basic HTML Tags
+
+
This is a paragraph in HTML.
+
+Bold text and italic text
+
+Underlined text
+
+Highlighted text via HTML
+
+## Div and Span
+
+
+
This is a styled div container.
+
With coloredspan elements.
+
+
+## HTML Table
+
+
+
+
+
Name
+
Type
+
Status
+
+
+
+
+
Feature A
+
Enhancement
+
✅ Done
+
+
+
Feature B
+
Bug Fix
+
🔄 In Progress
+
+
+
+
+## Details and Summary
+
+
+ Click to expand
+
This is hidden content revealed by clicking the summary.
+
+
Item 1
+
Item 2
+
Item 3
+
+
+
+
+ This is open by default
+
Content visible from the start.
+
+
+## Keyboard Input
+
+Press Ctrl + C to copy.
+
+Press Ctrl + Shift + P to open command palette.
+
+## Abbreviation and Definition
+
+YN is a great markdown editor.
+
+
+
Markdown
+
A lightweight markup language
+
Yank Note
+
A feature-rich markdown editor
+
+
+## Figure and Figcaption
+
+
+
+ Figure 1: A placeholder image
+
+
+## Colored Text
+
+Red text
+Green text
+Blue text
+Purple text
+
+## Progress Bar
+
+ 75%
+
+## Mixed HTML and Markdown
+
+
+
+**This is markdown** inside an HTML div.
+
+- List item 1
+- List item 2
+
+`Code` works here too.
+
+
+
+## Notes
+
+- HTML rendering is controlled by `mdOptions.html` (default: `true`)
+- In safe mode, certain tags and attributes are filtered
+- Script tags are prevented for security
+- HTML can be freely mixed with markdown content
diff --git a/test/md/image-enhancements.md b/test/md/image-enhancements.md
new file mode 100644
index 00000000..8d2bc1b7
--- /dev/null
+++ b/test/md/image-enhancements.md
@@ -0,0 +1,68 @@
+# Image Enhancements Test
+
+This document tests image enhancement features in Yank Note.
+
+## Basic Image
+
+
+
+## Image with Size
+
+### Width and Height
+
+
+
+### Width Only (auto height)
+
+
+
+### Percentage Width
+
+
+
+## Image with Query Parameters
+
+### Inline Display
+
+ This text is next to the inline image.
+
+### White Background
+
+
+
+### Combined Parameters
+
+
+
+## Image Centering
+
+When a paragraph contains only a single image, it is automatically centered:
+
+
+
+## Image with Attributes
+
+{style="border-radius: 50%;"}
+
+{.with-border}
+
+{.reduce-brightness}
+
+## Image in Different Contexts
+
+### Image in List
+
+-  Item with image
+-  Another item
+
+### Image in Table
+
+| Image | Description |
+|-------|-------------|
+|  | First image |
+|  | Second image |
+
+### Image in Blockquote
+
+> 
+> An image inside a blockquote.
diff --git a/test/md/kroki.md b/test/md/kroki.md
new file mode 100644
index 00000000..e6523b31
--- /dev/null
+++ b/test/md/kroki.md
@@ -0,0 +1,162 @@
+# Kroki Diagrams Test
+
+This document tests Kroki diagram rendering in Yank Note.
+
+> **Note**: Requires the `@yank-note/extension-kroki` extension.
+
+## WaveDrom (Digital Timing Diagram)
+
+```js
+// --kroki-- wavedrom
+{
+ signal: [
+ { name: "clk", wave: "p.....|..." },
+ { name: "data", wave: "x.345x|=.x", data: ["head", "body", "tail", "data"] },
+ { name: "req", wave: "0.1..0|1.0" },
+ {},
+ { name: "ack", wave: "1.....|01." }
+ ]
+}
+```
+
+## GraphViz (DOT)
+
+```js
+// --kroki-- graphviz
+digraph G {
+ rankdir=LR;
+ node [shape=box, style=filled, fillcolor=lightblue];
+
+ A [label="Input"];
+ B [label="Process"];
+ C [label="Output"];
+ D [label="Log"];
+
+ A -> B;
+ B -> C;
+ B -> D [style=dashed];
+}
+```
+
+## Ditaa (ASCII Art Diagrams)
+
+```js
+// --kroki-- ditaa
++--------+ +-------+ +-------+
+| +---+ ditaa | | |
+| Text | +-------+ |diagram|
+|Document| |!magic!| | |
+| {d}| | | | |
++---+----+ +-------+ +-------+
+ : ^
+ | Lots of work |
+ +-------------------------+
+```
+
+## BlockDiag
+
+```js
+// --kroki-- blockdiag
+blockdiag {
+ A -> B -> C -> D;
+ A -> E -> F -> G;
+
+ group {
+ label = "Group 1";
+ color = "#FF9900";
+ A; B; C;
+ }
+
+ group {
+ label = "Group 2";
+ color = "#3399FF";
+ E; F;
+ }
+}
+```
+
+## SeqDiag (Sequence Diagram)
+
+```js
+// --kroki-- seqdiag
+seqdiag {
+ browser -> webserver [label = "GET /index.html"];
+ browser <-- webserver;
+ browser -> webserver [label = "POST /form"];
+ browser <-- webserver;
+ browser -> webserver [label = "GET /image.png"];
+ browser <-- webserver;
+}
+```
+
+## ActDiag (Activity Diagram)
+
+```js
+// --kroki-- actdiag
+actdiag {
+ write -> convert -> review
+
+ lane user {
+ label = "User"
+ write [label = "Write document"];
+ review [label = "Review result"];
+ }
+
+ lane engine {
+ label = "Engine"
+ convert [label = "Convert to HTML"];
+ }
+}
+```
+
+## ERD (Entity Relationship Diagram)
+
+```js
+// --kroki-- erd
+[Person]
+*name
+height
+weight
+
+[Pet]
+*name
+breed
+
+Person *--* Pet
+```
+
+## SVGBob (ASCII Art to SVG)
+
+```js
+// --kroki-- svgbob
+ .---.
+ /-o-/--
+ .-/ / /->
+ ( * \/
+ '-. \
+ \ /
+ '
+```
+
+## C4 Diagram (PlantUML)
+
+```js
+// --kroki-- c4plantuml
+@startuml
+!include C4_Context.puml
+
+Person(user, "User", "A user of Yank Note")
+System(yn, "Yank Note", "Markdown editor")
+System_Ext(ext, "Extensions", "Plugin system")
+
+Rel(user, yn, "Uses")
+Rel(yn, ext, "Loads")
+@enduml
+```
+
+## Notes
+
+- Kroki supports many diagram types through a unified API
+- Use `// --kroki-- [diagram-type]` marker in JS code blocks
+- Supported types include: wavedrom, graphviz, ditaa, blockdiag, seqdiag, actdiag, nwdiag, erd, svgbob, c4plantuml, and more
+- Diagrams are rendered server-side via the Kroki API
diff --git a/test/md/list-collapsible.md b/test/md/list-collapsible.md
new file mode 100644
index 00000000..32252caa
--- /dev/null
+++ b/test/md/list-collapsible.md
@@ -0,0 +1,55 @@
+# Collapsible Lists Test
+
+This document tests the collapsible list feature in Yank Note.
+
+> **Note**: Enable collapsible lists by setting `render.list-collapsible: true` in front matter or settings.
+
+## Basic Collapsible List
+
+- Parent item 1
+ - Child item 1.1
+ - Child item 1.2
+ - Grandchild 1.2.1
+ - Grandchild 1.2.2
+ - Child item 1.3
+- Parent item 2
+ - Child item 2.1
+ - Child item 2.2
+- Parent item 3 (no children, not collapsible)
+
+## Deeply Nested List
+
+- Level 1
+ - Level 2
+ - Level 3
+ - Level 4
+ - Level 5
+ - Level 6
+
+## Mixed List Types
+
+1. Ordered parent 1
+ - Unordered child A
+ - Unordered child B
+ 1. Ordered grandchild I
+ 2. Ordered grandchild II
+2. Ordered parent 2
+ - Unordered child C
+
+## Collapsible with Content
+
+- **Project Structure**
+ - `src/` - Source code
+ - `main/` - Main application
+ - `renderer/` - UI renderer
+ - `share/` - Shared utilities
+ - `test/` - Test files
+ - `build/` - Build configuration
+ - `scripts/` - Build scripts
+
+## Usage Notes
+
+- Click the chevron icon to collapse/expand nested lists
+- The chevron appears on hover for items with children
+- Leaf items (no children) are not collapsible
+- Configure via `render.list-collapsible` setting
diff --git a/test/md/luckysheet.md b/test/md/luckysheet.md
new file mode 100644
index 00000000..3cffd962
--- /dev/null
+++ b/test/md/luckysheet.md
@@ -0,0 +1,23 @@
+# Luckysheet Test
+
+This document tests Luckysheet (spreadsheet) integration in Yank Note.
+
+## Embed Luckysheet File
+
+Use a link with `link-type="luckysheet"` attribute to embed a Luckysheet spreadsheet:
+
+[My Spreadsheet](./example.luckysheet){link-type="luckysheet"}
+
+## Multiple Sheets
+
+[Financial Data](./financial.luckysheet){link-type="luckysheet"}
+
+[Inventory Tracker](./inventory.luckysheet){link-type="luckysheet"}
+
+## Notes
+
+- Luckysheet provides Excel-like spreadsheet functionality within Yank Note
+- Files use the `.luckysheet` extension
+- Spreadsheets are embedded using the link syntax with `link-type="luckysheet"` attribute
+- Supports formulas, formatting, charts, and other spreadsheet features
+- **Known Issues**: There may be bugs with this integration; use with caution
diff --git a/test/md/macro.md b/test/md/macro.md
new file mode 100644
index 00000000..57169002
--- /dev/null
+++ b/test/md/macro.md
@@ -0,0 +1,81 @@
+---
+enableMacro: true
+define:
+ --February--: February
+ --�ÿ月--: 二月
+---
+
+# Macro Replacement Test
+
+This document tests the macro replacement feature (`[= expression =]`) of Yank Note.
+
+> **Note**: Macros require `enableMacro: true` in front matter to work.
+
+## Basic Expressions
+
+Simple math: [= 1 + 2 =]
+
+String operation: [= 'Hello' + ' ' + 'World' =]
+
+Ternary: [= true ? 'Yes' : 'No' =]
+
+## Built-in Variables
+
+### Document Information (`$doc`)
+
+Document basename: [= $doc.basename =]
+
+Document name: [= $doc.name =]
+
+## Sequence Numbering (`$seq`)
+
+Figure [= $seq('figure') =]: First diagram
+
+Figure [= $seq('figure') =]: Second diagram
+
+Figure [= $seq('figure') =]: Third diagram
+
+Table [= $seq('table') =]: First table
+
+Table [= $seq('table') =]: Second table
+
+## Variable Export (`$export`)
+
+[= $export('greeting', 'Hello from Yank Note') =]
+
+The exported value is: [= greeting =]
+
+[= $export('count', 42) =]
+
+The count is: [= count =]
+
+## Date and Time
+
+Current timestamp: [= new Date().toISOString() =]
+
+Year: [= new Date().getFullYear() =]
+
+## Conditional Content
+
+[= 1 > 0 ? '✅ Condition is true' : '❌ Condition is false' =]
+
+## Text Define Replacement
+
+The month is: --FEBRUARY--
+
+中文月份: --二月--
+
+## Complex Expressions
+
+Array operation: [= [1,2,3,4,5].reduce((a,b) => a+b, 0) =]
+
+String repeat: [= '⭐'.repeat(5) =]
+
+## Include Other Documents
+
+
+
+
+## After Macro Hook
+
+[= $afterMacro(() => { /* post-processing logic */ }) =]
diff --git a/test/md/mark.md b/test/md/mark.md
new file mode 100644
index 00000000..d8735d26
--- /dev/null
+++ b/test/md/mark.md
@@ -0,0 +1,43 @@
+# Mark / Highlight Test
+
+This document tests the mark (highlight) syntax supported by Yank Note.
+
+## Basic Highlighting
+
+==This text is highlighted==
+
+This sentence has ==highlighted words== in the middle.
+
+## Multiple Highlights
+
+==First highlight== and ==second highlight== in one line.
+
+## Highlight with Other Formatting
+
+==**Bold and highlighted**==
+
+==*Italic and highlighted*==
+
+==`Code and highlighted`==
+
+==~~Strikethrough and highlighted~~==
+
+## Highlight in Context
+
+Important: ==Remember to save your work== before closing the editor.
+
+The key takeaway is ==Yank Note supports rich markdown features==.
+
+## Highlight in Lists
+
+- ==Important item==
+- Normal item
+- ==Another important item==
+
+## Highlight in Blockquote
+
+> The most important part of this quote is ==right here==.
+
+## Cloze Extension Note
+
+When the `@yank-note/extension-cloze` extension is installed, highlighted text (`==text==`) can also function as cloze deletions for flashcard-style learning. The highlighted text can be toggled between visible and hidden states.
diff --git a/test/md/markmap.md b/test/md/markmap.md
new file mode 100644
index 00000000..24648148
--- /dev/null
+++ b/test/md/markmap.md
@@ -0,0 +1,85 @@
+# Markmap Test
+
+This document tests Markmap (interactive mind map) rendering in Yank Note.
+
+> **Note**: Requires the `@yank-note/extension-markmap` extension.
+
+## Using `{.markmap}` Class on List
+
++ Yank Note{.markmap}
+ + **Editing**
+ + Markdown syntax
+ + Code highlighting
+ + Auto-completion
+ + **Preview**
+ + Real-time rendering
+ + Diagrams
+ + Math formulas
+ + **Organization**
+ + Wiki links
+ + Tags
+ + TOC
+ + **Extensions**
+ + Mermaid
+ + ECharts
+ + Draw.io
+
+## Software Architecture Markmap
+
++ Application Architecture{.markmap}
+ + **Frontend**
+ + Vue.js
+ + TypeScript
+ + CSS/SCSS
+ + **Backend**
+ + Electron
+ + Node.js
+ + File System API
+ + **Plugins**
+ + markdown-it
+ + KaTeX
+ + PrismJS
+ + **Build**
+ + Vite
+ + electron-builder
+
+## Using Markmap Code Block
+
+```markmap
+# Learning Path
+
+## Frontend
+### HTML
+### CSS
+### JavaScript
+#### React
+#### Vue
+#### Angular
+
+## Backend
+### Node.js
+### Python
+### Go
+
+## DevOps
+### Docker
+### Kubernetes
+### CI/CD
+```
+
+## Full Document Markmap
+
+To render the entire document as a markmap, add this to the front matter:
+
+```yaml
+---
+defaultPreviewer: 'Markmap'
+---
+```
+
+## Notes
+
+- Add `{.markmap}` class to a list root item for inline markmap
+- Use `markmap` code block for standalone markmaps
+- Set `defaultPreviewer: 'Markmap'` to render entire document as markmap
+- Markmaps are interactive: zoom, pan, expand/collapse nodes
diff --git a/test/md/math-katex.md b/test/md/math-katex.md
new file mode 100644
index 00000000..2b43a9df
--- /dev/null
+++ b/test/md/math-katex.md
@@ -0,0 +1,118 @@
+# KaTeX Math Test
+
+This document tests KaTeX math formula rendering in Yank Note.
+
+## Inline Math
+
+The quadratic formula is $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$.
+
+Einstein's equation: $E = mc^2$.
+
+Simple expression: $a^2 + b^2 = c^2$.
+
+Greek letters: $\alpha$, $\beta$, $\gamma$, $\delta$, $\epsilon$, $\theta$, $\lambda$, $\mu$, $\pi$, $\sigma$, $\omega$.
+
+## Block Math
+
+$$
+\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
+$$
+
+$$
+\int_{0}^{\infty} e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
+$$
+
+$$
+f(x) = \begin{cases}
+ x^2 & \text{if } x \geq 0 \\
+ -x^2 & \text{if } x < 0
+\end{cases}
+$$
+
+## Matrix
+
+$$
+A = \begin{pmatrix}
+ a_{11} & a_{12} & a_{13} \\
+ a_{21} & a_{22} & a_{23} \\
+ a_{31} & a_{32} & a_{33}
+\end{pmatrix}
+$$
+
+$$
+\begin{bmatrix}
+ 1 & 0 & 0 \\
+ 0 & 1 & 0 \\
+ 0 & 0 & 1
+\end{bmatrix}
+$$
+
+## Aligned Equations
+
+$$
+\begin{aligned}
+ a &= b + c \\
+ d &= e + f + g \\
+ h &= i + j + k + l
+\end{aligned}
+$$
+
+## Fractions and Binomials
+
+$$
+\frac{n!}{k!(n-k)!} = \binom{n}{k}
+$$
+
+## Limits and Calculus
+
+$$
+\lim_{x \to 0} \frac{\sin x}{x} = 1
+$$
+
+$$
+\frac{d}{dx}\left( \int_{a}^{x} f(t)\,dt \right) = f(x)
+$$
+
+## Chemical Equations (mhchem)
+
+$\ce{H2O}$
+
+$\ce{CO2 + H2O -> H2CO3}$
+
+$\ce{2H2 + O2 ->[\text{combustion}] 2H2O}$
+
+$\ce{Fe^{2+} + 2OH^{-} -> Fe(OH)2 v}$
+
+## Trigonometric Functions
+
+$$
+\sin^2\theta + \cos^2\theta = 1
+$$
+
+$$
+e^{i\pi} + 1 = 0
+$$
+
+## Summation and Product
+
+$$
+\prod_{i=1}^{n} x_i = x_1 \cdot x_2 \cdots x_n
+$$
+
+$$
+\sum_{k=0}^{\infty} \frac{x^k}{k!} = e^x
+$$
+
+## Set Notation
+
+$$
+A \cup B = \{x : x \in A \text{ or } x \in B\}
+$$
+
+$$
+A \cap B = \{x : x \in A \text{ and } x \in B\}
+$$
+
+$$
+\forall x \in \mathbb{R}, \exists y \in \mathbb{R} : x + y = 0
+$$
diff --git a/test/md/mermaid.md b/test/md/mermaid.md
new file mode 100644
index 00000000..4b09086c
--- /dev/null
+++ b/test/md/mermaid.md
@@ -0,0 +1,145 @@
+# Mermaid Diagrams Test
+
+This document tests Mermaid diagram rendering in Yank Note.
+
+> **Note**: Requires the `@yank-note/extension-mermaid` extension.
+
+## Flowchart
+
+```mermaid
+graph TD
+ A[Start] --> B{Is it working?}
+ B -->|Yes| C[Great!]
+ B -->|No| D[Debug]
+ D --> B
+ C --> E[End]
+```
+
+## Flowchart (Left to Right)
+
+```mermaid
+graph LR
+ A[Hard Edge] -->|Link text| B(Round Edge)
+ B --> C{Decision}
+ C -->|One| D[Result 1]
+ C -->|Two| E[Result 2]
+ C -->|Three| F[Result 3]
+```
+
+## Sequence Diagram
+
+```mermaid
+sequenceDiagram
+ participant Alice
+ participant Bob
+ participant Charlie
+ Alice->>Bob: Hello Bob, how are you?
+ Bob-->>Alice: I'm good, thanks!
+ Alice->>Charlie: Hi Charlie!
+ Charlie-->>Alice: Hey Alice!
+ Bob->>Charlie: Hi there!
+ Note over Alice,Charlie: A group conversation
+```
+
+## Class Diagram
+
+```mermaid
+classDiagram
+ class Animal {
+ +String name
+ +int age
+ +makeSound()
+ }
+ class Dog {
+ +String breed
+ +fetch()
+ }
+ class Cat {
+ +String color
+ +purr()
+ }
+ Animal <|-- Dog
+ Animal <|-- Cat
+```
+
+## State Diagram
+
+```mermaid
+stateDiagram-v2
+ [*] --> Idle
+ Idle --> Processing : Start
+ Processing --> Success : Complete
+ Processing --> Error : Fail
+ Error --> Idle : Retry
+ Success --> [*]
+```
+
+## Gantt Chart
+
+```mermaid
+gantt
+ title Project Timeline
+ dateFormat YYYY-MM-DD
+ section Planning
+ Requirements :a1, 2024-01-01, 10d
+ Design :a2, after a1, 15d
+ section Development
+ Backend :b1, after a2, 20d
+ Frontend :b2, after a2, 25d
+ section Testing
+ Integration :c1, after b1, 10d
+ UAT :c2, after c1, 5d
+```
+
+## Pie Chart
+
+```mermaid
+pie title Language Distribution
+ "JavaScript" : 40
+ "TypeScript" : 30
+ "Python" : 15
+ "Go" : 10
+ "Other" : 5
+```
+
+## Entity Relationship Diagram
+
+```mermaid
+erDiagram
+ USER ||--o{ ORDER : places
+ ORDER ||--|{ LINE-ITEM : contains
+ PRODUCT ||--o{ LINE-ITEM : "is in"
+ USER {
+ int id
+ string name
+ string email
+ }
+ ORDER {
+ int id
+ date created
+ string status
+ }
+ PRODUCT {
+ int id
+ string name
+ float price
+ }
+```
+
+## Journey Map
+
+```mermaid
+journey
+ title My Working Day
+ section Go to Work
+ Wake up: 1: Me
+ Get dressed: 2: Me
+ Commute: 3: Me, Bus
+ section At Work
+ Code: 5: Me
+ Meeting: 2: Me, Boss
+ Lunch: 4: Me, Colleagues
+ section Go Home
+ Commute: 3: Me, Bus
+ Relax: 5: Me
+```
diff --git a/test/md/mindmap.md b/test/md/mindmap.md
new file mode 100644
index 00000000..adb20c42
--- /dev/null
+++ b/test/md/mindmap.md
@@ -0,0 +1,68 @@
+# Mind Map Test
+
+This document tests the mind map feature in Yank Note.
+
+## Basic Mind Map
+
+- Central Topic{.mindmap}
+ - [1] Branch A
+ - Sub-topic A1
+ - Sub-topic A2
+ - [2] Branch B
+ - Sub-topic B1
+ - Sub-topic B2
+ - Sub-topic B3
+ - [3] Branch C
+ - Sub-topic C1
+
+## Project Planning Mind Map
+
+- Project Plan{.mindmap}
+ - [1] Requirements
+ - User Stories
+ - Acceptance Criteria
+ - Constraints
+ - [2] Design
+ - Architecture
+ - UI/UX
+ - Database Schema
+ - [3] Development
+ - Frontend
+ - Backend
+ - API
+ - [4] Testing
+ - Unit Tests
+ - Integration Tests
+ - E2E Tests
+ - [5] Deployment
+ - CI/CD
+ - Monitoring
+ - Documentation
+
+## Knowledge Map
+
+- Yank Note Features{.mindmap}
+ - [1] Markdown
+ - Basic Syntax
+ - Extended Syntax
+ - Custom Extensions
+ - [2] Diagrams
+ - Mermaid
+ - PlantUML
+ - Draw.io
+ - ECharts
+ - [3] Code
+ - Highlighting
+ - Execution
+ - Copy
+ - [4] Organization
+ - Wiki Links
+ - Tags
+ - TOC
+
+## Notes
+
+- Add `{.mindmap}` class to the root list item to render as a mind map
+- Uses kityminder-core as the rendering engine
+- Numbers in brackets `[1]`, `[2]` etc. are used for ordering branches
+- Nested list items become child nodes
diff --git a/test/md/multimd-table.md b/test/md/multimd-table.md
new file mode 100644
index 00000000..94e4dc37
--- /dev/null
+++ b/test/md/multimd-table.md
@@ -0,0 +1,87 @@
+# Multi-Markdown Table Test
+
+This document tests advanced table features provided by markdown-it-multimd-table.
+
+## Basic Table
+
+| Header 1 | Header 2 | Header 3 |
+|----------|----------|----------|
+| A1 | A2 | A3 |
+| B1 | B2 | B3 |
+
+## Multiline Cells
+
+Enable with `multimd-multiline: true` in render settings.
+
+| Feature | Description |
+|---------|-------------|
+| Multiline | This cell spans \
+multiple lines using \
+the backslash continuation |
+| Single | This is a single line cell |
+
+## Column Span
+
+| Header 1 | Header 2 | Header 3 |
+|----------|----------|----------|
+| A1 | A2 | A3 |
+| Merged Cell || | B3 |
+| C1 | Merged Cell ||
+
+## Row Span
+
+Enable with `multimd-rowspan: true` in render settings.
+
+| Header 1 | Header 2 | Header 3 |
+|----------|----------|----------|
+| A1 | A2 | A3 |
+| ^^ | B2 | B3 |
+| C1 | C2 | ^^ |
+
+The `^^` indicates the cell above spans into this row.
+
+## Headerless Table
+
+Enable with `multimd-headerless: true` in render settings.
+
+| | | |
+|----------|----------|----------|
+| A1 | A2 | A3 |
+| B1 | B2 | B3 |
+
+## Multi-body Table
+
+Enable with `multimd-multibody: true` in render settings.
+
+| Header 1 | Header 2 |
+|----------|----------|
+| Body 1 A | Body 1 B |
+| Body 1 C | Body 1 D |
+|----------|----------|
+| Body 2 A | Body 2 B |
+| Body 2 C | Body 2 D |
+
+## Complex Table
+
+| Project | Status | Priority | Notes |
+|---------|--------|----------|-------|
+| Feature A | ✅ Done | High | Merged Cell ||
+| Feature B | 🔄 In Progress || Medium | Needs review |
+| Feature C | ❌ Blocked | Low | Waiting for \
+dependency resolution |
+
+## Table with Alignment and Formatting
+
+| Left | Center | Right |
+|:-----|:------:|------:|
+| **Bold** | *Italic* | `Code` |
+| [Link](#) | ~~Strike~~ | ==Mark== |
+| Normal | $E=mc^2$ | :smile: |
+
+## Notes
+
+- `multimd-multiline`: Enable multi-line cells using `\` continuation
+- `multimd-rowspan`: Enable row spanning using `^^` marker
+- `multimd-headerless`: Allow tables without header rows
+- `multimd-multibody`: Allow multiple table bodies separated by horizontal rules
+- Column spanning uses empty cells (`||`)
diff --git a/test/md/plantuml.md b/test/md/plantuml.md
new file mode 100644
index 00000000..dff28e51
--- /dev/null
+++ b/test/md/plantuml.md
@@ -0,0 +1,108 @@
+# PlantUML Test
+
+This document tests PlantUML diagram rendering in Yank Note.
+
+## Sequence Diagram
+
+@startuml
+Alice -> Bob: Authentication Request
+Bob --> Alice: Authentication Response
+
+Alice -> Bob: Another authentication Request
+Alice <-- Bob: Another authentication Response
+@enduml
+
+## Use Case Diagram
+
+@startuml
+left to right direction
+actor User
+actor Admin
+
+rectangle "Yank Note" {
+ User --> (Edit Document)
+ User --> (View Preview)
+ User --> (Export PDF)
+ Admin --> (Manage Extensions)
+ Admin --> (Configure Settings)
+ (Edit Document) --> (Save Document)
+}
+@enduml
+
+## Class Diagram
+
+@startuml
+class Document {
+ -title: String
+ -content: String
+ -tags: List
+ +render(): HTML
+ +save(): void
+ +export(format: String): File
+}
+
+class Editor {
+ -document: Document
+ -plugins: List
+ +open(path: String): void
+ +close(): void
+}
+
+class Plugin {
+ -name: String
+ -version: String
+ +activate(): void
+ +deactivate(): void
+}
+
+Editor "1" --> "1" Document : edits
+Editor "1" --> "*" Plugin : uses
+@enduml
+
+## Activity Diagram
+
+@startuml
+start
+:Open Document;
+if (Document exists?) then (yes)
+ :Load Content;
+ :Render Preview;
+else (no)
+ :Create New Document;
+ :Initialize Template;
+endif
+:Edit Content;
+:Save Document;
+stop
+@enduml
+
+## Component Diagram
+
+@startuml
+package "Yank Note" {
+ [Editor] --> [Markdown Engine]
+ [Markdown Engine] --> [Plugins]
+ [Editor] --> [File System]
+ [Plugins] --> [KaTeX]
+ [Plugins] --> [Mermaid]
+ [Plugins] --> [PlantUML]
+}
+@enduml
+
+## State Diagram
+
+@startuml
+[*] --> Draft
+Draft --> Editing : open
+Editing --> Saved : save
+Saved --> Editing : edit
+Editing --> Preview : toggle
+Preview --> Editing : toggle
+Saved --> [*] : close
+@enduml
+
+## Notes
+
+- PlantUML requires Java and Graphviz for local rendering
+- Can be configured to use an online API endpoint
+- Diagrams are enclosed between `@startuml` and `@enduml` markers
diff --git a/test/md/reveal-js.md b/test/md/reveal-js.md
new file mode 100644
index 00000000..425ff803
--- /dev/null
+++ b/test/md/reveal-js.md
@@ -0,0 +1,91 @@
+---
+defaultPreviewer: 'Reveal.js'
+revealJsOpts:
+ theme: moon
+ progress: true
+ controls: true
+ slideNumber: true
+---
+
+# Reveal.js Presentation Test
+
+This document tests Reveal.js presentation rendering in Yank Note.
+
+> **Note**: Requires the `@yank-note/extension-reveal-js` extension.
+
+::: section
+
+## Slide 1: Introduction
+
+Welcome to the Yank Note Presentation!
+
+- Feature-rich markdown editor
+- Extensible with plugins
+- Cross-platform support
+
+:::
+
+::: section
+
+## Slide 2: Markdown Support
+
+Yank Note supports rich markdown features:
+
+| Feature | Status |
+|---------|--------|
+| Headings | ✅ |
+| Tables | ✅ |
+| Code | ✅ |
+| Math | ✅ |
+| Diagrams | ✅ |
+
+:::
+
+::: section
+
+## Slide 3: Code Highlighting
+
+```javascript
+function fibonacci(n) {
+ if (n <= 1) return n;
+ return fibonacci(n - 1) + fibonacci(n - 2);
+}
+```
+
+:::
+
+::: section
+
+## Slide 4: Math Formulas
+
+The Euler's identity:
+
+$$e^{i\pi} + 1 = 0$$
+
+The quadratic formula:
+
+$$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$
+
+:::
+
+::: section
+
+## Slide 5: Thank You!
+
+:tada: Thanks for watching!
+
+- GitHub: [purocean/yn](https://github.com/purocean/yn)
+- Extensions: [yank-note-extension](https://github.com/purocean/yank-note-extension)
+
+:::
+
+---
+
+## Configuration Notes
+
+To create a Reveal.js presentation:
+
+1. Set `defaultPreviewer: 'Reveal.js'` in front matter
+2. Configure options via `revealJsOpts`
+3. Use `::: section` containers to separate slides
+4. Available themes: `moon`, `black`, `white`, `league`, `beige`, `sky`, `night`, `serif`, `simple`, `solarized`
diff --git a/test/md/superscript-subscript.md b/test/md/superscript-subscript.md
new file mode 100644
index 00000000..5052113d
--- /dev/null
+++ b/test/md/superscript-subscript.md
@@ -0,0 +1,43 @@
+# Superscript and Subscript Test
+
+This document tests superscript and subscript syntax supported by Yank Note.
+
+## Superscript (`^text^`)
+
+This is the 29^th^ of the month.
+
+E = mc^2^
+
+x^n^ + y^n^ = z^n^
+
+2^10^ = 1024
+
+a^b+c^
+
+## Subscript (`~text~`)
+
+Water is H~2~O.
+
+Carbon dioxide: CO~2~
+
+The chemical formula for sulfuric acid is H~2~SO~4~.
+
+x~1~, x~2~, x~3~, ..., x~n~
+
+a~ij~ represents the element in row i, column j.
+
+## Combined Usage
+
+The formula a~n~ = r^n^ demonstrates both subscript and superscript.
+
+Chemical reaction: 2H~2~ + O~2~ → 2H~2~O
+
+x~i~^2^ + y~i~^2^ = r^2^
+
+## Superscript and Subscript in Context
+
+In physics, the speed of light is approximately 3 × 10^8^ m/s.
+
+The general term of a geometric sequence: a~n~ = a~1~ × r^n-1^
+
+Avogadro's number: 6.022 × 10^23^ mol^-1^
diff --git a/test/md/toc.md b/test/md/toc.md
new file mode 100644
index 00000000..fc1965a5
--- /dev/null
+++ b/test/md/toc.md
@@ -0,0 +1,61 @@
+# Table of Contents (TOC) Test
+
+This document tests the TOC generation feature of Yank Note.
+
+## TOC with Unordered List
+
+[toc]{type: "ul", level: [1,2,3]}
+
+## TOC with Ordered List
+
+[toc]{type: "ol", level: [2,3]}
+
+## TOC with Custom Levels
+
+[toc]{type: "ul", level: [2,3,4,5]}
+
+---
+
+## Section One
+
+Content of section one.
+
+### Sub-section 1.1
+
+Content of sub-section 1.1.
+
+#### Sub-sub-section 1.1.1
+
+Content of sub-sub-section 1.1.1.
+
+### Sub-section 1.2
+
+Content of sub-section 1.2.
+
+## Section Two
+
+Content of section two.
+
+### Sub-section 2.1
+
+Content of sub-section 2.1.
+
+### Sub-section 2.2
+
+Content of sub-section 2.2.
+
+#### Sub-sub-section 2.2.1
+
+Content of sub-sub-section 2.2.1.
+
+##### Deep Heading 2.2.1.1
+
+Deep content.
+
+## Section Three
+
+Content of section three.
+
+### Sub-section 3.1
+
+Content of sub-section 3.1.
diff --git a/test/md/wiki-links.md b/test/md/wiki-links.md
new file mode 100644
index 00000000..f89f85dd
--- /dev/null
+++ b/test/md/wiki-links.md
@@ -0,0 +1,47 @@
+# Wiki Links Test
+
+This document tests the wiki links syntax supported by Yank Note.
+
+## Basic Wiki Links
+
+Link to a file: [[basic-syntax]]
+
+Link to a file with extension: [[basic-syntax.md]]
+
+## Wiki Links with Anchors
+
+Link to a heading: [[basic-syntax#headings]]
+
+Link to a specific section: [[toc#section-one]]
+
+## Wiki Links with Display Text
+
+Custom display: [[basic-syntax|Click here for basic syntax]]
+
+Custom display with anchor: [[toc#section-two|Go to Section Two]]
+
+## Wiki Links with Line/Column Position
+
+Link to specific line: [[basic-syntax:10,1|Line 10 of basic syntax]]
+
+Link to line and column: [[basic-syntax:5,3|Line 5, Column 3]]
+
+## Image Wiki Links
+
+Embed an image: ![[example-image.png]]
+
+## Cross-reference Examples
+
+See the [[front-matter|Front Matter documentation]] for configuration options.
+
+Check [[macro|Macro features]] for expression evaluation.
+
+Review [[containers|Container blocks]] for layout options.
+
+## Wiki Links in Lists
+
+- [[basic-syntax|Basic Syntax]]
+- [[extended-syntax|Extended Syntax]]
+- [[math-katex|Math & KaTeX]]
+- [[code-features|Code Features]]
+- [[mermaid|Mermaid Diagrams]]