carbon / previewmodebutton
Toggle preview mode with a button in the Neos CMS backend
Package info
github.com/CarbonPackages/Carbon.PreviewModeButton
Language:JavaScript
Type:neos-carbon
pkg:composer/carbon/previewmodebutton
0.1.1
2025-04-22 12:23 UTC
Requires
- neos/neos-ui: ^7.3 || ^8.0 || ^9.0
README
Carbon.PreviewModeButton
Toggle preview mode with a button in the Neos CMS backend.
Installation
Carbon.PreviewModeButton is available via packagist.
Run the following command in your site package
composer require --no-update carbon/previewmodebutton
Then run composer update in your project root.
Configuration
To add a button into the panel add a configuration like this:
Neos: Neos: Ui: frontendConfiguration: "Carbon.PreviewMode:Button": # If you set a view mode to true, it will fallback to Neos.Neos:Document and will have no custom icon or label rawContent: true # The name of the preview mode teaserView: # If a document is this node type or has this supertype, show the button. Otherwise it will be hidden # Defaults to 'Neos.Neos:Document' nodeTypeName: "Foo.Bar:Mixin.TeaserDocument" # Set the icon. Defaults to 'fas fa-pencil' icon: "fas fa-images" # Add `aria-label` and `title` to the button. Will be translated, but can also be a plain text label: "Foo.Bar:Backend.Main:editPreviewModes.teaserView" # Sets the position. Defaults to 'start' position: "start 1"