flowpack/structuredediting

Neos 的结构化编辑

安装数: 2,985

依赖关系: 2

建议者: 0

安全: 0

星标: 24

关注者: 14

分支: 6

开放问题: 25

语言:JavaScript

类型:neos-package

2.0 2020-07-29 07:21 UTC

This package is auto-updated.

Last update: 2024-09-06 19:00:18 UTC


README

允许内联重用检查器编辑器。提示:将所有与内容相关的属性内联,只将元数据属性留在检查器中。

Demo

入门指南

  1. composer require 'flowpack/structuredediting:@dev'
  2. 将节点类型属性配置为内联可编辑,如下所示
'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. 使用常见的 ContentElementEditable 注解渲染此字段的可编辑注释,这将转换为铅笔编辑图标
prototype(Some.Node:Type) < prototype(Neos.Fusion:Array) {
 dateEditable = ContentElementEditable {
	 property = 'date'
 }
 date = ${Date.format(node.properties.date, 'd-m-Y')}
 @process.contentElementWrapping = ContentElementWrapping
}

此包背后的概念将在成熟后合并回核心,现在我们先在实践中尝试一下!