philippoehrlein/typo-and-paste
Composer 安装命令:
composer require philippoehrlein/typo-and-paste
包简介
A Kirby plugin for managing and inserting special characters with multi-language support.
README 文档
README
Typo & Paste is a Kirby plugin that allows users to easily manage and insert special characters with multi-language support.
Table of Contents
Features
- Multi-Language Support: Supports various languages for characters and the user interface.
- Custom Characters: Users can define and add their own characters.
- Multiple Access Points:
- Panel toolbar button
- Writer mark button
- Textarea button
- Keyboard shortcuts (
Option+T/Alt+T)
- Clipboard Copy: Easily copy characters to the clipboard.
Compatibility
This plugin is compatible with Kirby 4 and 5.
Installation
Composer
composer require philippoehrlein/typo-and-paste
Manual Installation
- Download and extract the plugin
- Copy the
typo-and-pastefolder into/site/plugins/
Configuration
Access Points
The plugin provides four ways to access special characters:
1. Panel Toolbar Button
In Kirby 5, configure the Panel toolbar button in your page, site, or file blueprint:
buttons: - typo-and-paste - preview - settings - languages - status
Or globally in your config:
// site/config/config.php return [ 'panel' => [ 'viewButtons' => [ // Page view 'page' => ['typo-and-paste', 'preview', 'settings', 'languages', 'status'], // Site view 'site' => ['typo-and-paste', 'preview', 'languages'] ] ] ];
2. Writer Mark Button
To add the Typo & Paste button to the Writer toolbar, include typo-and-paste in your field's marks configuration:
fields: article: label: Article type: writer toolbar: inline: true marks: - bold - italic - underline - strike - code - "|" - link - email - "|" - clear - "|" - typo-and-paste
3. Textarea Button
To add the Typo & Paste button to a textarea, add typo-and-paste in your field's buttons configuration:
fields: article: label: Article type: textarea buttons: - typo-and-paste
4. Keyboard Shortcuts
- Use
Option+T(Mac) orAlt+T(Windows/Linux) to open the character dialog from anywhere - Navigate characters using arrow keys
- Press
Enterto add the selected character to your clipboard
Character Configuration
Define custom characters in your config: Each character can either be defined as a simple string or as an object with value and a multilingual label. Labels are used for accessibility and shown as tooltips in the UI.
// site/config/config.php return [ 'philippoehrlein.typo-and-paste' => [ 'characters' => [ [ 'label' => [ 'en' => 'Quotation Marks', 'de' => 'Anführungszeichen', ], 'lang' => 'fr', // Optional: Show only for French content 'characters' => [ ['value' => '«', 'label' => ['en' => 'Left guillemet', 'de' => 'Linkes Guillemets']], ['value' => '»', 'label' => ['en' => 'Right guillemet', 'de' => 'Rechtes Guillemets']], '‹', // also allowed: plain characters '›' ] ], ] ] ];
AI Support
This plugin includes an AI-friendly schema definition (AI-SCHEMA.md) to help generate configurations using AI language models. The schema provides:
- Structured format for character group definitions
- Clear property descriptions and requirements
- Guidelines for creating meaningful character groups
- Examples of proper configuration
Using AI for Configuration
- Share the content of AI-SCHEMA.md with your AI assistant
- Describe your specific use case and requirements
- The AI will generate a configuration following the schema
- Review and adjust the generated configuration as needed
Example prompt:
Using the schema, create a configuration for a blog about [your topic]. The content will be in [languages] and editors work in [languages].
Translations
The plugin includes a default set of translations for en, de, fr, es, nl, and it.
Add custom translations:
// site/languages/en.php return [ 'translations' => [ 'philippoehrlein.typo-and-paste.buttonTitle' => 'Special Characters', 'philippoehrlein.typo-and-paste.copiedMessage' => '{character} copied to clipboard', ] ];
Search
Extend Typo & Paste with a searchable interface for special characters. Simply install Typo, Search & Paste — and you’re ready to go.
Composer
composer require philippoehrlein/typo-search-and-paste
Github
Development
- Clone the repository
- Install dependencies:
composer install - Run playground:
composer dev - Open: localhost:8000
License
MIT License
philippoehrlein/typo-and-paste 适用场景与选型建议
philippoehrlein/typo-and-paste 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6.23k 次下载、GitHub Stars 达 41, 最近一次更新时间为 2024 年 08 月 31 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 philippoehrlein/typo-and-paste 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 philippoehrlein/typo-and-paste 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 6.23k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 41
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-31


