Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johannschopplich/kirby-punctuation-section
✒️ Insert punctuation marks into your text with a single click
https://github.com/johannschopplich/kirby-punctuation-section
kirby kirby-cms kirby-plugin
Last synced: 25 days ago
JSON representation
✒️ Insert punctuation marks into your text with a single click
- Host: GitHub
- URL: https://github.com/johannschopplich/kirby-punctuation-section
- Owner: johannschopplich
- License: mit
- Created: 2021-11-22T22:51:26.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-12T14:13:12.000Z (2 months ago)
- Last Synced: 2024-10-03T12:39:23.376Z (about 1 month ago)
- Topics: kirby, kirby-cms, kirby-plugin
- Language: Vue
- Homepage: https://kirbyseo.com
- Size: 2.91 MB
- Stars: 33
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Kirby Punctuation Section](./.github/kirby-punctuation-section.png)
# Kirby Punctuation Section
This plugin provides a simple, **customizable** section for your Kirby project from which your customers can quickly add punctuation to their text or writer fields.
By default, clicking one of the punctuation buttons will insert the character at the current cursor position of a text or writer field.
## Features
- ♟️ Collect your favourite punctuation characters
- 🪡 Insert characters at the current cursor position
- 🖊️ Optionally paste characters to your clipboard
- 🌐 Fully Translatable## Requirements
> [!NOTE]
> The current version of this plugin requires Kirby 4 or higher. For Kirby 3 support, please use version 2 of Kirby Punctuation Section.## Installation
### Composer
```bash
composer require johannschopplich/kirby-punctuation-section
```### Download
Download and copy this repository to `/site/plugins/kirby-punctuation-section`.
## Usage
To get started, create a `sections/punctuation.yml` file in your blueprints folder and add the characters you want to use to the `chars` array. A bare minimum section example looks like this:
```yaml
type: punctuation
label: Punctuations
fieldsets:
- category:
label: German Quotation Marks
chars:
- „
- ‚
- ‘
- “
help: This is a description for the category
```After that, you can add the section to your blueprint like this:
```yml
sections:
punctuation: sections/punctuation
```## Clipboard API
Instead of inserting the given character at the current cursor position, you can also copy it to your clipboard by setting the `clipboard` option to `true`:
```yaml
type: punctuation
label: Punctuations
clipboard: true
```> [!NOTE]
> The Clipboard API is only available for secure contexts, it cannot be used on non-HTTPS pages.
>
> Setting a browser flag can allow HTTP pages to be interpreted as secure, which can be useful for local development.## Label Translations & Help Texts
Just like other Kirby built-in sections, the `label` and `help` fields can be translated.
Take a look at the section blueprint below for a full fledged example:
```yaml
type: punctuation
label:
de: Kleine Interpunktionshilfe
en: Lil Punctuation Helper
fieldsets:
- category:
label:
de: Apostroph
en: Apostrophe
chars:
- ’
help:
de: Das ist eine Beschreibung der Kategorie
en: This is a description for the category
- category:
label:
de: Gedankenstrich
en: Hyphen
chars:
- –
- category:
label:
de: Dt. Anführungszeichen
en: German Quotation Marks
chars:
- „
- ‚
- ‘
- “
- category:
label:
de: Engl. Anführungszeichen
en: English Quotation Marks
chars:
- “
- ‘
- ’
- ”
- category:
label: Guillemets
chars:
- »
- ›
- ‹
- «
- category:
label:
de: Sonstiges
en: Other
chars:
- …
- ×
```## License
[MIT](./LICENSE) License © 2021-PRESENT [Johann Schopplich](https://github.com/johannschopplich)