A WordPress plugin to automatically add furigana (振り仮名) to Japanese kanji in the Gutenberg editor.
Kakitai is a WordPress plugin that makes reading Japanese easier by automatically adding furigana (pronunciation guides in hiragana) to kanji. The plugin integrates directly into the Gutenberg editor and uses the Kuromoji library for accurate Japanese morphological analysis.
- 🎯 Automatic furigana addition: Select Japanese text and add furigana with one click
- 🔄 Toggle on/off: Click again to remove furigana
- 📝 Supported blocks: Paragraph and Heading blocks
- 🏷️ Standard HTML tags: Uses
<ruby>,<rt>, and<rp>tags for maximum compatibility - 🎨 Native integration: Button in the editor toolbar
- 🚀 Optimized performance: Client-side morphological analysis with caching
<!-- Before -->
今日は良い天気です
<!-- After -->
<ruby>今日<rp>(</rp><rt>きょう</rt><rp>)</rp></ruby>は<ruby>良<rp>(</rp><rt>よ</rt><rp>)</rp></ruby>い<ruby>天気<rp>(</rp><rt>てんき</rt><rp>)</rp></ruby>です- Download the latest
wp-kakitai.zipfrom the releases page - In WordPress, go to Plugins → Add New
- Click "Upload Plugin"
- Select the downloaded ZIP file
- Click "Install Now"
- Activate the plugin
cd wp-content/plugins
git clone https://github.com/firestar300/wp-kakitai.git
cd wp-kakitai
npm install
npm run buildThen activate the plugin in WordPress.
- Open the Gutenberg editor
- Create or edit a Paragraph or Heading block
- Select Japanese text containing kanji
- Click the Furigana button (🌐 icon) in the toolbar
- Furigana are automatically added!
- Click the button again to remove furigana
- Node.js 20+
- npm
- WordPress 6.7+
- PHP 7.4+
# Clone the repository
git clone https://github.com/firestar300/wp-kakitai.git
cd wp-kakitai
# Install dependencies
npm install
composer install
# Start development mode
npm start
# Or build for production
npm run buildwp-kakitai/
├── src/
│ ├── index.js # Main entry point
│ ├── style.scss # Editor styles
│ └── hooks/
│ └── useKanjiFurigana.js # React hook for Kuromoji
├── build/ # Compiled files (generated)
│ ├── index.js
│ └── dict/ # Kuromoji dictionaries
├── wp-kakitai.php # Main plugin file
├── webpack.config.js # Webpack configuration
└── package.json # npm dependencies
npm start # Development mode with watch
npm run build # Production build
npm run lint:js # JavaScript linter
npm run lint:css # CSS linter
npm run format # Format codecomposer install # Install PHP dependencies
composer lint # PHP linter (PHPCS)
composer format # Auto-fix PHPCS issues- WordPress Gutenberg: Block API
- React: UI framework
- Kuromoji.js: Japanese morphological analyzer
- Webpack 5: Bundler with Node.js polyfills
- @wordpress/scripts: WordPress build tools
See CHANGELOG.md for version history.
Contributions are welcome! Feel free to:
- Fork the project
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under GPL-2.0-or-later. See the LICENSE file for details.
- Kuromoji.js for morphological analysis
- The WordPress community for development tools
- All contributors who helped improve this project
firestar300
- GitHub: @firestar300
If you find this project useful, please give it a ⭐ on GitHub!
Made with ❤️ for the Japanese language learning community
