Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
Bastian Allgeier edited this page Aug 6, 2019 · 14 revisions

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.

Installation

Download and copy this repository to /site/plugins/editor.

Blueprint setup

Once the plugin is installed, you can use the new editor field type in your blueprints:

fields:
  text:
    label: Editor
    type: editor

Read more …

In your templates

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() ?>

Read more …

Block types

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

Read more …

Custom HTML output

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.

Read more …

Block extensions

The editor can be extended with custom block plugins.

Read more …

Clone this wiki locally