Hanzi Writer
approvedby Nikita Smirnov
Interactive Chinese character writing blocks using Hanzi Writer
Hanzi Writer for Obsidian
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.
Features
- Interactive Chinese character writing practice
- Character stroke animation
- Writing quizzes with stroke order checking
- Customizable character display options
Installation
- Open Obsidian Settings
- Go to Community Plugins and disable Safe Mode
- Click Browse and search for "Hanzi Writer"
- Install the plugin and enable it
Usage
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
}
```
Configuration Options
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
Controls
Each character block includes three buttons:
- Animate: Shows stroke order animation
- Quiz: Starts writing practice mode
- Debug: Shows debug information in console
Development
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
License
MIT License - see LICENSE file for details
Support
If you encounter any issues or have suggestions, please open an issue on GitHub.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.