-
-
Notifications
You must be signed in to change notification settings - Fork 28
Home
Kirby Editor is a new type of WYSIWYG editor for Kirby. It's a mixture between a regular WYSIWYG and a block editor to bring together the best parts of both worlds in a user-friendly interface.
Download and copy this repository to /site/plugins/editor
.
composer require getkirby/editor
You must use Kirby 3.3.0 or newer in combination with the Kirby Editor.
Once the plugin is installed, you can use the new editor
field type in your blueprints:
fields:
text:
label: Editor
type: editor
The editor stores its content as JSON. To convert it to HTML you can use the blocks
field method in your templates.
<?= $page->text()->blocks() ?>
The Kirby Editor comes with a set of default block types to create rich content.
- Code
- Heading 1
- Heading 2
- Heading 3
- Image
- KirbyText
- Line
- Numbered list
- Unordered list
- Quote
- Text
- Video
You can customize the HTML output of each block individually with custom block snippets. All snippets for editor blocks must be located in /site/snippets/editor
.
The editor can be extended with custom block plugins.