An Obsidian plugin that adds interactive Chinese character writing blocks using Hanzi Writer. This plugin allows you to create interactive blocks for practicing Chinese character writing directly in your Obsidian notes.
- Interactive Chinese character writing practice
- Character stroke animation
- Writing quizzes with stroke order checking
- Customizable character display options
- Open Obsidian Settings
- Go to Community Plugins and disable Safe Mode
- Click Browse and search for "Hanzi Writer"
- Install the plugin and enable it
Create a code block with the language hanzi-writer and provide a JSON configuration:
```hanzi-writer
{
"character": "你",
"width": 100,
"height": 100,
"showOutline": true,
"strokeAnimationSpeed": 1,
"delayBetweenStrokes": 1000
}
```
character: (Required) The Chinese character to displaywidth: Width of the character box in pixels (default: 100)height: Height of the character box in pixels (default: 100)padding: Padding around the character (default: 5)quizOnStart: Start in quiz mode immediately (default: true)showOutline: Show character outline (default: false)strokeAnimationSpeed: Speed of stroke animations (default: 1)delayBetweenStrokes: Delay between strokes in milliseconds (default: 1000)strokeColor: Color of character strokes (defaults to theme text color)drawingColor: Color of user drawing (defaults to theme text color)
and all other options from Hanzi Writer
Each character block includes three buttons:
- Animate: Shows stroke order animation
- Quiz: Starts writing practice mode
- Debug: Shows debug information in console
This plugin is built using:
- Obsidian API
- Hanzi Writer
- TypeScript
To build from source:
- Clone this repository
- Install dependencies with
npm install - Build with
npm run build - Copy
main.jsandmanifest.jsonto your Obsidian plugins folder
MIT License - see LICENSE file for details
If you encounter any issues or have suggestions, please open an issue on GitHub.