codeq / htmlwidget
HTML Widget for the Neos CMS
Installs: 16 309
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 3
Forks: 5
Open Issues: 0
Type:neos-package
Requires
- flowpack/nodetemplates: ~1.0 || dev-master
- neos/fusion-afx: ^1.0 ||~7.0 || ~8.0 || dev-master
- neos/neos: ~3.2 || ~4.0 || ~5.0 || ~7.0 || ~8.0 || dev-master
README
HTML Widget for Neos CMS
For new projects we recommend to use CodeQ.HtmlContent, CodeQ.HtmlWiget will still be maintained.
This package allows developers to create HTML widgets in the administration. Editors can reuse them across on the website.
Administrators and everyone with the role CodeQ.HtmlWidget:HtmlWidgetDefinitionEditor
can create HTML Widget Definitions including HTML, CSS and JavaScript.
All editors can add those HTML Widgets as content NodeType without being able to change the content.
Features
- Automatically removes JavaScript code in the backend, to not break the Neos Administration
- Reference used media assets in your widget definition, so these assets can not be deleted.
- Restricts editing of HTML widget definitions, while allowing editors to use those widgets
The development and the public-releases of this package are generously sponsored by Code Q Web Factory.
Installation
CodeQ.HtmlWidget is available via packagist. "codeq/htmlwidget" : "^1.7"
to the require section of the composer.json
or run:
composer require codeq/htmlwidget
We use semantic-versioning so every breaking change will increase the major-version number.
Use Case 1: Administrators create widgets, which can be used by editors
This is the default case and you just need to install the package.
If you are planning to create a whole widget library, we recommend creating a separate, hidden Widget Definition page for that.
Use Case 2: Developers can create HTML Widgets, no reuse planned
If you want to create HTML widgets, but don't want to reuse them you only need the
CodeQ.HtmlWidget:Content.HtmlWidgetDefinition
. Disable the reusing element in YAML:
'CodeQ.HtmlWidget:Content.HtmlWidget': abstract: true
If your Neos user has no admin privilege, add the role HtmlWidgetDefinitionEditor
.
License
Licensed under MIT, see LICENSE
Contribution
We will gladly accept contributions. Please send us pull requests.