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.
ℹ️ Since this repo is a plugin template, I recommend you fork it and include it manually into your
site/plugins
folder.
Download and copy this repository to /site/plugins/kirby-writer-marks
.
git submodule add https://github.com/johannschopplich/kirby-writer-marks.git site/plugins/kirby-writer-marks
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
.
ℹ️ 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
Build the final Panel plugin:
npm run build
- Roman Steiner for his inspirational Oh Hi Mark plugin
MIT License © 2021 Johann Schopplich