carbon/inline-editable
Composer 安装命令:
composer require carbon/inline-editable
包简介
Enhances Neos.Neos:Editable with better placeholder handling and optional inline character counting in the Neos backend
README 文档
README
Enhances Neos.Neos:Editable with better placeholder handling and optional inline character counting in the Neos backend.
Features
- Dynamic placeholder override based on the configured fallback text
- Optional live character counter in focused editable fields
- Visual counter states (
ok,warning,error)
Requirements
neos/neos^8.3 || ^9.0carbon/includeassets^7.0
Installation
Install the package via Composer:
composer require carbon/inline-editable
The package auto-includes its Fusion and backend assets via Configuration/Settings.yaml.
Usage
This package extends Neos.Neos:Editable in Resources/Private/Fusion/Root.fusion.
Fallback Placeholder
Use fallback to provide placeholder content when no value exists:
title = Neos.Neos:Editable {
property = 'headline'
fallback = ${q(node).property('title')}
}
Character Counter
Enable the counter by setting counter = true:
teaserText = Neos.Neos:Editable {
property = 'teaserText'
fallback = 'Enter teaser text'
counter = true
}
When active, the backend script updates counter values live while editing.
You can also configure warning and error thresholds:
counterMinWarning: Sets the minimum character count that should still be considered okay. If the current count is less than or equal to this value, the state becomeswarning.counterMinError: Sets the critical minimum character count. If the current count is less than or equal to this value, the state becomeserror.counterMaxWarning: Sets the maximum character count before warning. If the current count is greater than this value, the state becomeswarning.counterMaxError: Sets the critical maximum character count. If the current count is greater than this value, the state becomeserror.
Example with thresholds:
teaserText = Neos.Neos:Editable {
property = 'teaserText'
fallback = 'Enter teaser text'
counter = true
counterMinWarning = 40
counterMinError = 20
counterMaxWarning = 180
counterMaxError = 220
}
State priority is error before warning.
Development
Install frontend dependencies and build backend assets:
pnpm install pnpm build
Available scripts from package.json:
pnpm run jsbundles Resources/Private/Assets/Backend.mts to Resources/Public/Modules/Backend.mjspnpm run cssbundles/minifies Resources/Private/Assets/Backend.pcss to Resources/Public/Styles/Backend.csspnpm buildruns both
License
GPL-3.0-or-later
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2026-07-01