carbon/slideshoweditor
Composer 安装命令:
composer require carbon/slideshoweditor
包简介
Neos package that provides a slideshow value object and a custom Neos UI inspector editor for creating and editing slideshows
README 文档
README
Carbon.SlideshowEditor is a Neos package that provides a slideshow value object and a custom Neos UI inspector editor for creating and editing slideshows.
The editor supports mixed slide content:
- Text items
- Image items
- Video items (via
carbon/videoplatformeditor)
Features
- Custom inspector editor for
Carbon\\SlideshowEditor\\Slideshow - Modal-based slideshow editing UI in Neos
- Reorder/move/add/remove slides and slide items
- Value-object based PHP domain model with JSON serialization
- Content Repository normalizer for consistent serialization behavior
- Asset usage extraction support for slideshow media
- Eel helper for convenient Fusion rendering
Requirements
- Neos UI
~9.1.4 - PHP package dependency:
carbon/videoplatformeditor^1.0
Installation
Install the package in your Neos distribution and run dependency installation:
composer require carbon/slideshoweditor
JavaScript Build
This repository uses Yarn workspaces with three modules:
@carbon/slideshoweditor-core@carbon/slideshoweditor-editor@carbon/slideshoweditor-plugin
Build the Neos UI plugin bundle:
yarn build
Watch mode during development:
yarn workspace @carbon/slideshoweditor-plugin run watch
The bundle output is written to:
Resources/Public/JavaScript/Plugin.jsResources/Public/JavaScript/Plugin.css
Quality Checks
TypeScript check:
yarn lint
Core module tests:
yarn test
Neos Integration
The package registers:
- Neos UI JavaScript and stylesheet resources
- Inspector datatype mapping:
Carbon\\SlideshowEditor\\Slideshow->Carbon.SlideshowEditor/Inspector/Editors/SlideshowEditor
- Content Repository property converter (
SlideshowNormalizer) - Eel helper namespace:
Carbon.SlideShowEditor
Data Model
The slideshow is represented as nested immutable value objects:
SlideshowSlide[]SlideItemInterface[]TextSlideItemImageSlideItemVideoSlideItem
Serialized slide item shapes use a type discriminator:
text:{ "type": "text", "text": "..." }image:{ "type": "image", "imageId": "..." }video:{ "type": "video", "video": { ... } }
Usage in NodeTypes
Use Carbon\\SlideshowEditor\\Slideshow as property datatype in your NodeType definition and configure the inspector to use datatype-based editor resolution.
Example property definition:
properties: slideshow: type: Carbon\\SlideshowEditor\\Slideshow ui: label: Slideshow inspector: group: content
Fusion / Eel Rendering Helpers
The package exposes helper methods in Fusion via Carbon.SlideShowEditor, including:
hasSlides(slideshow)imageById(imageId)itemType(item)
These helpers simplify rendering slideshow items in Fusion/AFX.
Repository Structure
Classes/: PHP value objects, Eel helper, and infrastructure integrationConfiguration/: Neos, UI, and Content Repository settingsModules/core: editor domain logic and testsModules/editor: React-based UI components for dialogs and item editingModules/plugin: Neos UI extensibility manifest + bundlingResources/: translations and generated frontend assetsTests/: PHP unit/functional tests
Development Notes
- The plugin bundle uses
esbuildand Neos UI extensibility aliases. - The project keeps TypeScript domain logic in
Modules/coreand UI composition inModules/editor. - Generated UI assets in
Resources/Public/JavaScriptshould be rebuilt after frontend changes.
License
GPL-3.0-or-later
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2026-07-01