carbon/rangeeditor

Enhanced Range Inspector Editor for Neos CMS

Installs: 967

Dependents: 3

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:neos-carbon

0.1.5 2024-10-12 13:53 UTC

This package is auto-updated.

Last update: 2024-11-12 14:04:19 UTC


README

Latest stable version Total downloads License GitHub forks GitHub stars GitHub watchers

Enhanced range editor for Neos CMS

This editor has some more features as the one who is already in the core:

  • Minimal and maximal are clickable
  • If minimal or maximal value is set, the value in the middle gets hidden
  • You can set a own text for every value

Example:

'Foo.Bar:Element':
  properties:
    zoomLevel:
      type: integer
      ui:
        inspector:
          editor: 'Carbon.RangeEditor/Editor'
          editorOptions:
            showMinLabel: true
            showMaxLabel: true
            minLabel: null
            maxLabel: null
            showInput: true
            min: 1
            max: 6
            step: 1
            unit: ''
            valueLabels:
              1: Globe
              2: Coninent
              3: Country
              4: Area
              5: City
              6: Street

Of course you can localize a value. e.g. Vendor.Package:Folder.Filename:1 If you have set a value label for the min or max value, you don't need to set minLabel of maxLabel.

If you work with xlf files, you can also ad a setting called valueLabelsFile:

'Foo.Bar:Element':
  properties:
    zoomLevel:
      type: integer
      ui:
        inspector:
          editor: 'Carbon.RangeEditor/Editor'
          editorOptions:
            minLabel: null
            maxLabel: null
            min: 1
            max: 6
            step: 1
            unit: ''
            valueLabelsFile: 'Foo.Bar:ZoomLevel'
            valueLabels:
              2: 'Override label from Foo.Bar:ZoomLevel:2'

In that case, the plugin search for the translation value in the file ZoomLevel.xlf in the package Foo.Bar. Example: For the value 5 the translation string will be Foo.Bar:ZoomLevel:5.