jg/kirby-fields-block

Kirby Fields Block

Installs: 17 005

Dependents: 0

Suggesters: 0

Security: 0

Stars: 109

Watchers: 4

Forks: 5

Open Issues: 5

Language:JavaScript

Type:kirby-plugin

v1.2.1 2023-01-22 19:02 UTC

This package is auto-updated.

Last update: 2024-03-23 19:24:09 UTC


README

Kirby block preview plugin to directly render block fields, allowing for inline editing.

68747470733a2f2f66696c65732e6a6f6e6761636e696b2e636f6d2f6b697262792d6669656c64732d707265766965772d312e706e67

Usage

Block definition

When creating a custom block in your blueprints, pass preview: fields to utilize this plugin

blockname:
  name: Block Name
  preview: fields # required
  wysiwyg: true # recommended
  fields:
    text:
      label: Text
      type: text

Setting wysiwyg: true prevents drawer from automatically opening when creating a new block.

Disable block title

You can disable the block title bar by passing label: false

blockname:
  name: Block Name
  preview: fields
  wysiwyg: true 
  label: false # disables block title bar
  fields:
    text:
      label: Text
      type: text
Example 68747470733a2f2f66696c65732e6a6f6e6761636e696b2e636f6d2f6b697262792d6669656c64732d707265766965772d322e706e67

Collapse/Expand block

You can collapse or expand the block preview by clicking on the arrow icon or double clicking the block title bar.

Notes

  • The block icon will appear in the title bar.
  • Currently does not support blocks with tabs.

Installation

composer require jg/kirby-fields-block
Other installation methods

Download

Download and copy this repository to /site/plugins/kirby-fields-block.

Git submodule

git submodule add https://github.com/jongacnik/kirby-fields-block.git site/plugins/kirby-fields-block