Typo & Paste is a Kirby plugin that allows users to easily manage and insert special characters with multi-language support.
- 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.
This plugin is compatible with Kirby 4 and 5.
composer require philippoehrlein/typo-and-paste
- Download and extract the plugin
- Copy the
typo-and-paste
folder into/site/plugins/
The plugin provides four ways to access special characters:
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']
]
]
];
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
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
- Use
Option+T
(Mac) orAlt+T
(Windows/Linux) to open the character dialog from anywhere - Navigate characters using arrow keys
- Press
Enter
to add the selected character to your clipboard
Define custom characters in your config:
// 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' => ['«', '»', '‹', '›']
],
]
]
];
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
- 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
Using the schema, create a configuration for a blog about [your topic]. The content will be in [languages] and editors work in [languages].
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',
]
];
- Clone the repository
- Install dependencies:
composer install
- Run playground:
composer dev
- Open: localhost:8000
MIT License