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.
- 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.
CodeQ.HtmlWidget is available via packagist. "codeq/htmlwidget" : "~1.3"
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.
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.
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
.
Licensed under MIT, see LICENSE
We will gladly accept contributions. Please send us pull requests.