flowpack/structuredediting

Structured editing for Neos

Installs: 999

Dependents: 2

Suggesters: 0

Security: 0

Stars: 17

Watchers: 15

Forks: 3

Open Issues: 2

Language:JavaScript

Type:neos-package

0.1 2019-03-19 11:01 UTC

This package is not auto-updated.

Last update: 2020-02-06 10:51:30 UTC


README

Allows to reuse inspector editors inline. Hint: put all content-related properties inline and leave only metadata properties in the inspector.

Demo

Getting started:

  1. composer require 'flowpack/structuredediting:@dev'
  2. Configure your nodetype properties to be inline editable like this:
'Some.Node:Type'
  properties:
    date:
      type: DateTime
      defaultValue: now
      ui:
        label: Date
        reloadIfChanged: true
        inline:
          editor: 'Flowpack.StructuredEditing/EditorEnvelope'
          editorOptions:
            format: 'd-m-Y H:i'
            editor: 'Neos.Neos/Inspector/Editors/DateTimeEditor'
  1. Render an editable annotation for this field, using usual ContentElementEditable annotation, which will be turned into the pencil edit icon:
prototype(Some.Node:Type) < prototype(Neos.Fusion:Array) {
 dateEditable = ContentElementEditable {
	 property = 'date'
 }
 date = ${Date.format(node.properties.date, 'd-m-Y')}
 @process.contentElementWrapping = ContentElementWrapping
}

The concept behind this package will be merged back into the core once it matures, for now let's try it out in practice!