承接 philippoehrlein/typo-and-paste 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

License Version

Typo & Paste is a Kirby plugin that allows users to easily manage and insert special characters with multi-language support.

Cover Typo & Paste

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

  1. Download and extract the plugin
  2. Copy the typo-and-paste folder 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

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

Keyboard Shortcuts

  • Use Option+T (Mac) or Alt+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

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

  1. Share the content of AI-SCHEMA.md with your AI assistant
  2. Describe your specific use case and requirements
  3. The AI will generate a configuration following the schema
  4. 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

Typo, Search and Paste 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

Typo, Search & Paste

Development

  1. Clone the repository
  2. Install dependencies: composer install
  3. Run playground: composer dev
  4. 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 我们能提供哪些服务?
定制开发 / 二次开发

基于 philippoehrlein/typo-and-paste 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 6.23k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 41
  • 点击次数: 10
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 41
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-31