Skip to content

Custom marks for Kirby's writer field – footnote mark included

Notifications You must be signed in to change notification settings

Small-Systems/kirby-writer-marks

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Footnote mark for the Kirby writer field

Custom Writer Field Marks

This repository serves as a plugin boilerplate for extending the writer field with custom marks until Kirby natively supports them.

One of the beauties of open source is ideas are thrown out into the world to be picked up and improved upon in exchange. An older version of this plugin relied on a patcher for the panel. Roman Steiner found a way to free it from the patcher, culminating in his clever Oh Hi Mark plugin! Based on his approach I reworked my plugin boilerplate, without making use of the prototype hack.

Installation

ℹ️ Since this repo is a plugin template, I recommend you fork it and include it manually into your site/plugins folder.

Download

Download and copy this repository to /site/plugins/kirby-writer-marks.

Git submodule

git submodule add https://github.com/johannschopplich/kirby-writer-marks.git site/plugins/kirby-writer-marks

Usage

This plugin adds a custom footnote mark, which will create a <article-footnote> custom element. Styling included.

You can create custom plugins yourself. To get inspiration, head over to Kirby's official writer marks.

Custom marks are located in src/Marks and initiate inside src/index.js.

Development

ℹ️ kirbyup is used for building the Kirby Panel plugin.

Spin up the development server to watch your main script. You will have to refresh the Panel manually to see your new custom marks in the writer field.

npm run dev

Production

Build the final Panel plugin:

npm run build

Credits

License

MIT License © 2021 Johann Schopplich

About

Custom marks for Kirby's writer field – footnote mark included

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 81.4%
  • CSS 10.0%
  • PHP 8.6%