PHPackages                             beromir/neos-toggle-editor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. beromir/neos-toggle-editor

ActiveNeos-plugin[Utility &amp; Helpers](/categories/utility)

beromir/neos-toggle-editor
==========================

A plugin for Neos CMS which provides a toggle editor.

v1.6.2(2mo ago)55.4k↓12.8%2[1 issues](https://github.com/beromir/Beromir.ToggleEditor/issues)1GPL-3.0JavaScript

Since Nov 26Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/beromir/Beromir.ToggleEditor)[ Packagist](https://packagist.org/packages/beromir/neos-toggle-editor)[ RSS](/packages/beromir-neos-toggle-editor/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (2)Versions (24)Used By (1)

Toggle Editor for Neos CMS
==========================

[](#toggle-editor-for-neos-cms)

The toggle editor lets you select one of multiple values. It provides different layout options.

Layouts
-------

[](#layouts)

### Grid

[](#grid)

[![Screenshot of grid layouts](https://private-user-images.githubusercontent.com/4510166/374322104-59a680e4-da5e-4f47-a610-3a9a98928427.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI2OTM5NzAsIm5iZiI6MTc4MjY5MzY3MCwicGF0aCI6Ii80NTEwMTY2LzM3NDMyMjEwNC01OWE2ODBlNC1kYTVlLTRmNDctYTYxMC0zYTlhOTg5Mjg0MjcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDYyOSUyR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0.kvxJ6Vev9ht1brgL_LH2DCYB9yhmUqNtOGcKYvdYBmo)Property definitions from the screenshot```
headingLevel:
  type: string
  ui:
    label: Heading level
    inspector:
      editor: Beromir.ToggleEditor/Editor
      editorOptions:
        values:
          h1:
            label: H1
            description: Heading level 1
          h2:
            label: H2
            description: Heading level 2
          h3:
            label: H3
            description: Heading level 3
alignment:
  type: string
  ui:
    label: Alignment
    inspector:
      editor: Beromir.ToggleEditor/Editor
      editorOptions:
        values:
          left:
            icon: align-left
            description: Align left
          center:
            label: Center
            icon: align-center
          right:
            label: Right
            icon: align-right
layout:
  type: string
  ui:
    label: Layout
    inspector:
      editor: Beromir.ToggleEditor/Editor
      editorOptions:
        allowEmpty: true
        columns: 2
        values:
          grid:
            label: Grid
          flex:
            label: Flex
          list:
            label: Radio
          color:
            label: Color
```

### Flex

[](#flex)

[![Screenshot of flex](https://private-user-images.githubusercontent.com/4510166/374323282-ab880a7f-7ec7-4b5a-9e72-8d120ce3d859.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI2OTM5NzAsIm5iZiI6MTc4MjY5MzY3MCwicGF0aCI6Ii80NTEwMTY2LzM3NDMyMzI4Mi1hYjg4MGE3Zi03ZWM3LTRiNWEtOWU3Mi04ZDEyMGNlM2Q4NTkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDYyOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA2MjlUMDA0MTEwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZGVlNTczNmZlODhhM2QxNmJkNjU2ZTI2NDc0YTQzM2M2Mzc2NjliZTM3ZDJmNTNlZjcxOGYwMGJkN2Y5ZGUxZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.cMacgYvPo758sUgtWptD7QK6E8P9Mg_m5mZ70GTxfMk)](https://private-user-images.githubusercontent.com/4510166/374323282-ab880a7f-7ec7-4b5a-9e72-8d120ce3d859.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI2OTM5NzAsIm5iZiI6MTc4MjY5MzY3MCwicGF0aCI6Ii80NTEwMTY2LzM3NDMyMzI4Mi1hYjg4MGE3Zi03ZWM3LTRiNWEtOWU3Mi04ZDEyMGNlM2Q4NTkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDYyOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA2MjlUMDA0MTEwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZGVlNTczNmZlODhhM2QxNmJkNjU2ZTI2NDc0YTQzM2M2Mzc2NjliZTM3ZDJmNTNlZjcxOGYwMGJkN2Y5ZGUxZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.cMacgYvPo758sUgtWptD7QK6E8P9Mg_m5mZ70GTxfMk)Property definitions from the screenshot```
spacing:
  type: string
  ui:
    label: Spacing
    inspector:
      editor: Beromir.ToggleEditor/Editor
      editorOptions:
        layout: flex
        values:
          none:
            icon: times
            description: No spacing
          small:
            label: Small
          medium:
            label: Medium
          large:
            label: Large
```

### Flex Start

[](#flex-start)

[![Screenshot of flex-start layout](https://private-user-images.githubusercontent.com/4510166/376667915-f89d32f5-a87c-4191-a5e2-dc56eeed269e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI2OTM5NzAsIm5iZiI6MTc4MjY5MzY3MCwicGF0aCI6Ii80NTEwMTY2LzM3NjY2NzkxNS1mODlkMzJmNS1hODdjLTQxOTEtYTVlMi1kYzU2ZWVlZDI2OWUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDYyOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA2MjlUMDA0MTEwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjBlYTFhYmU3NGM3NTJhOTI5ODBmZmUzZjQxMDY1MDVlYWNkOTE1ZWFhMWNhNTBkYjU5OWYzZTg2YThlZDM1MyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.rTK_mlxNHLp4tqS8UQu87xdwwEnoH8hRLUU-lKiUZkM)](https://private-user-images.githubusercontent.com/4510166/376667915-f89d32f5-a87c-4191-a5e2-dc56eeed269e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI2OTM5NzAsIm5iZiI6MTc4MjY5MzY3MCwicGF0aCI6Ii80NTEwMTY2LzM3NjY2NzkxNS1mODlkMzJmNS1hODdjLTQxOTEtYTVlMi1kYzU2ZWVlZDI2OWUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDYyOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA2MjlUMDA0MTEwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjBlYTFhYmU3NGM3NTJhOTI5ODBmZmUzZjQxMDY1MDVlYWNkOTE1ZWFhMWNhNTBkYjU5OWYzZTg2YThlZDM1MyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.rTK_mlxNHLp4tqS8UQu87xdwwEnoH8hRLUU-lKiUZkM)Property definitions from the screenshot```
toggle:
  type: array
  ui:
    label: Toggle Mode
    inspector:
      editor: Beromir.ToggleEditor/Editor
      editorOptions:
        multiple: true
        layout: flex-start
        values:
          enable:
            icon: toggle-off
            iconActive: toggle-on
```

### List

[](#list)

[![Screenshot of list layout](https://private-user-images.githubusercontent.com/4510166/374323773-6cf075e1-c34b-4484-9221-130733ac9cf7.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI2OTM5NzAsIm5iZiI6MTc4MjY5MzY3MCwicGF0aCI6Ii80NTEwMTY2LzM3NDMyMzc3My02Y2YwNzVlMS1jMzRiLTQ0ODQtOTIyMS0xMzA3MzNhYzljZjcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW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ZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.UA9vwBWRMP9Gh9QgOiestr36ijY7XYSZC88JLsCrSt0)Property definitions from the screenshot```
size:
  type: string
  ui:
    label: Size
    inspector:
      editor: Beromir.ToggleEditor/Editor
      editorOptions:
        allowEmpty: true
        layout: list
        values:
          auto:
            icon: magic
            label: Auto
          small:
            label: Small
          medium:
            label: Medium
          large:
            label: Large
```

[![Screenshot of list layout with multiple option](https://private-user-images.githubusercontent.com/4510166/376665757-9239e9c9-ae76-4d0d-9466-b173537cd049.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI2OTM5NzAsIm5iZiI6MTc4MjY5MzY3MCwicGF0aCI6Ii80NTEwMTY2LzM3NjY2NTc1Ny05MjM5ZTljOS1hZTc2LTRkMGQtOTQ2Ni1iMTczNTM3Y2QwNDkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDYyOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA2MjlUMDA0MTEwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDM3NDc2ZGRhYjkzNTBlNTU4OTNhOWU5YTc5OTMzN2Y3NTI2ZTRkN2VmOWFiY2QyYTI4ZDE4ZWYxMDUwYzNjMiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.hZdw0LZD_6nl2N6FmRnbogbwYH3z4o2KBKUaDqlDShM)](https://private-user-images.githubusercontent.com/4510166/376665757-9239e9c9-ae76-4d0d-9466-b173537cd049.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI2OTM5NzAsIm5iZiI6MTc4MjY5MzY3MCwicGF0aCI6Ii80NTEwMTY2LzM3NjY2NTc1Ny05MjM5ZTljOS1hZTc2LTRkMGQtOTQ2Ni1iMTczNTM3Y2QwNDkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDYyOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA2MjlUMDA0MTEwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDM3NDc2ZGRhYjkzNTBlNTU4OTNhOWU5YTc5OTMzN2Y3NTI2ZTRkN2VmOWFiY2QyYTI4ZDE4ZWYxMDUwYzNjMiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.hZdw0LZD_6nl2N6FmRnbogbwYH3z4o2KBKUaDqlDShM)Property definitions from the screenshot```
checkboxGroup:
  type: array
  ui:
    label: Checkbox Group
    inspector:
      editor: Beromir.ToggleEditor/Editor
      editorOptions:
        multiple: true
        layout: list
        values:
          second:
            iconActive: fire
            label: Second Checkbox
            labelActive: Second Checkbox checked
            position: 20
          first:
            icon: wrench
            iconActiveRotate: 15
            label: First Checkbox
            position: 10
```

### Color

[](#color)

[![Screenshot of color layout with multiple color values](https://private-user-images.githubusercontent.com/4510166/374317568-1fbaf7c6-48fd-4db5-9777-5ac14d6f09fd.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOi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UNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDYyOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA2MjlUMDA0MTEwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NmI5OTM0Y2ZiM2UyNGIwODZhODAxNTdmMTRkNWY3ZTY5OWU2NzgxMGQyOTEwZmIyYjViMDNmZmZlZDViNWQwMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.QLJGvXCjUOtT0QJOcd5n6K-m43l2VY6DWjBNDoPzB6s)Property definitions from the screenshot```
color:
  type: string
  ui:
    label: Color layout
    inspector:
      editor: Beromir.ToggleEditor/Editor
      editorOptions:
        layout: color
        values:
          three:
            color:
              - "#009246"
              - white
              - "#cd2b37"
            label: "Italy colors"
            description: "Pizza Margherita"
          two:
            color: ["#5d26c3", "#271150"]
            label: "Two colors"
            description: "Purple haze"
          one:
            color: "#0d0617"
            label: "Dark color"
          transparent:
            color: transparent
            label: Transparent
```

Installation
------------

[](#installation)

Run the following command in your site package:

```
composer require --no-update beromir/neos-toggle-editor
```

Then run `composer update` in your project root.

Usage
-----

[](#usage)

You can select one of the following layout options:

- grid
- flex
- flex-start
- list
- color

If you use the color layout or the grid layout, you can optionally specify the number of columns to render more than one row. The color layout is a special case for selecting a color. It renders the color in the editor. You can use `transparent`as color value to render this value in a visible way for the editors (see screenshot above).

Add a property of type string to your NodeType definition and use the following editor configuration:

```
properties:
  alignment:
    # If multiple is true, this must be array, otherwise string
    type: string
    defaultValue: "left"
    ui:
      label: "Alignment"
      reloadIfChanged: true
      inspector:
        editor: "Beromir.ToggleEditor/Editor"
        editorOptions:
          # One of 'grid', 'flex', 'flex-start', 'list' or 'color'. Default: 'grid'
          layout: "flex"

          # Set number of columns to render multiple rows. Works only with 'grid' and 'color'
          # This can also be an expression like {items} / 2
          # Gets surrounded by Math.floor
          # Available values {items} = number of values / {maximalRows} = value from maximalRows
          # The smaller value from columns and maximalColumns will be used
          columns: 2

          # Alternativly you can set the maximal number of columns. Defaults to 4. Works only with 'grid' and 'color'
          # This can also be an expression like {items} / 2
          # Gets surrounded by Math.floor
          # Available values {items} = number of values
          maximalColumns: 4

          # Allow empty value
          allowEmpty: true

          # Value for empty state. Does not work in multiple mode
          emptyValue: "none"

          # Enable multiple mode. If this is true, the type must be array
          # If true, setting allowEmpty to false has no effect. The array can always be empty
          multiple: false

          # Define the size of the icons: 'xs', 'sm', 'lg', '2x' or '3x'. Default: null
          iconSize: "lg"

          # Disable the whole editor
          disable: false

          # This option makes it possible hide the whole editor (incl. label) based on data source
          hidden: false

          # Add custom styles to the wrapper
          wrapperCustomStyle:
            gap: 2

          # Add custom styles to the buttons itself
          buttonCustomStyle:
            borderRadius: 2

          # Set custom style for the labels (not set on view 'color')
          # The same is allowed inside a single value
          labelCustomStyle:
            fontSize: 25
            lineHeight: "39px"

          # Set the values
          values:
            left:
              # Add custom styles to the button itself
              buttonCustomStyle:
                borderRadius: 2

              # Set custom style for the label (not set on view 'color')
              labelCustomStyle:
                fontSize: 25
                lineHeight: "39px"

              # Show a label
              label: "Left"
              # Label on active state
              labelActive: "Item is left"

              # Show a description on hover
              description: "Align left"
              # Description on active state
              descriptionActive: "Item is left aligned"

              # Show an icon. Does not work with the color layout
              icon: "align-right"
              # Icon on active state. Does not work with the color layout
              iconActive: "align-left"
              # Rotate the icon (in degrees)
              iconRotate: -45
              # Rotate the icon on active state (in degrees)
              iconActiveRotate: -45

              # Specify the color to display in the editor. Does only work with the color layout
              # If you pass multiple colors as an array (e.g. ['white', 'black]) it will put all defined colors side by
              # side. (Transparent is also possible) This is useful if you have light and dark mode on your website
              color: "#ffffff"

              # Hide the value. Great if you work with ClientEval
              hidden: "ClientEval: !!node.property.anotherProperty"

              # Add a preview image. Does not work with the color layout. Can be also a string with svg markup
              preview: "resource://Vendor.Package/filenameInPublicFolder.png"
              # Add a preview on active state image. Does not work with the color layout. Can be also a string with svg markup
              previewActive: "resource://Vendor.Package/filenameInPublicFolder.png"
              # Rotate the preview (in degrees)
              previewRotate: -45
              # Rotate the preview on active state (in degrees)
              previewActiveRotate: -45

              # If true and no label is defined, the margin from the button get's removed. Defaults to false
              previewFull: true

              # Disable an item option
              disabled: false
            center:
              label: "Center"
              icon: "align-center"

              # The order of the values can be altered by setting position. It is the same logic as @position in Fusion
              # https://neos.readthedocs.io/en/stable/References/NeosFusionReference.html#neos-fusion-join
              # If the value is empty (''), the key for sorting is set to __empty__
              postion: 10
            right:
              label: "Right"
              icon: "align-right"

          # Optionally use a data source:
          # If `dataSourceIdentifier` or `dataSourceUri` is defined, the `values` from above will be ignored
          dataSourceIdentifier: "some-datasource"
          dataSourceUri: "some/custom-route"
          dataSourceAdditionalData:
            foo: "bar"
          dataSourceDisableCaching: false
```

Credits
-------

[](#credits)

This package is inspired by:

- [Carbon.ColorValues](https://github.com/CarbonPackages/Carbon.ColorValues)
- [Shel.Neos.ColorPicker](https://github.com/Sebobo/Shel.Neos.ColorPicker)
- [Kirby CMS toggles field](https://getkirby.com/docs/reference/panel/fields/toggles)
- [I13e.ButtonEditor](https://github.com/ideenstadtwerke/I13e.ButtonEditor)

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance81

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 59% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~39 days

Recently: every ~98 days

Total

23

Last Release

80d ago

Major Versions

v0.3.0 → v1.0.02024-10-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/9684d477fcb2b45b91e1c92c7cf3d439388a4c555e2cfff10e5bc188226c4f2b?d=identicon)[beromir](/maintainers/beromir)

---

Top Contributors

[![jonnitto](https://avatars.githubusercontent.com/u/4510166?v=4)](https://github.com/jonnitto "jonnitto (79 commits)")[![beromir](https://avatars.githubusercontent.com/u/45039929?v=4)](https://github.com/beromir "beromir (50 commits)")[![robinroloff](https://avatars.githubusercontent.com/u/116283647?v=4)](https://github.com/robinroloff "robinroloff (5 commits)")

---

Tags

editorneoscmseditorflowNeosneoscms

### Embed Badge

![Health badge](/badges/beromir-neos-toggle-editor/health.svg)

```
[![Health](https://phpackages.com/badges/beromir-neos-toggle-editor/health.svg)](https://phpackages.com/packages/beromir-neos-toggle-editor)
```

###  Alternatives

[shel/neos-colorpicker

A plugin for Neos CMS which provides a colorpicker editor

14104.7k6](/packages/shel-neos-colorpicker)[shel/neos-hyphens

A plugin for Neos CMS which provides hyphens for the inline editor

21214.3k1](/packages/shel-neos-hyphens)[techdivision/ckstyles

Neos package which enables you adding your custom style classes for the CkEditor with a simple Yaml configuration

21179.5k](/packages/techdivision-ckstyles)[carbon/includeassets

Include your assets (css, js) in an easy way into Neos

14235.7k15](/packages/carbon-includeassets)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
