codeq/passthrougheditor

这个Neos UI编辑器插件接受一个配置值,并将其转换后保存到另一个字段。

安装: 111

依赖: 0

建议者: 0

安全性: 0

星标: 1

关注者: 3

分支: 0

公开问题: 18

语言:JavaScript

类型:neos-package

v1.0.1 2019-09-24 13:43 UTC

This package is auto-updated.

Last update: 2024-09-09 13:27:26 UTC


README

此包提供了一个虚拟文本编辑器,它执行一个任务:从 editorOptions.value 中获取一个值并将其设置为一个值。当处理动态客户端配置的特殊情况时,这可能很有用。无论如何,下面是一个示例。

安装

  1. composer require '@codeq/passthrougheditor'
  2. 在 NodeTypes.yaml 中开始使用编辑器,例如:
Some:NodeType:
  properties:
    geopoint:
      type: Ttree\GoogleMapEditor\GeoPoint
      ui:
        inspector:
          editor: Ttree.GoogleMapEditor/Inspector/Editors/GeoPointEditor
          group: 'geo'
    latitude:
      type: string
      ui:
        inspector:
          editor: CodeQ.PassthroughEditor/Inspector/Editors/PassthroughEditor
          editorOptions:
            value: 'ClientEval:node.properties.geopoint && node.properties.geopoint[0]'
          group: 'geo'

在这个示例中,我们从 geopoint 属性获取纬度并将其保存到 latitude 属性中。