The successor of CodeQ.HtmlWidget
Create content nodes with HTML code, e.g. external players or iframe embeds. Manage who can create and editor those nodes with the role NEOSidekick.HtmlContent:HtmlWidgetDefinitionEditor.
- Validates HTML and prevents the backend from breaking by not rendering broken HTML
- Automatically removes JavaScript code in the backend, to not break the Neos Administration
- Used media assets can be set on the node, so these assets can not be deleted.
The development and the public-releases of this package are generously sponsored by Code Q Web Factory.
NEOSidekick.HtmlContent is available via packagist. "neosidekick/htmlcontent" : "~2.0" to the require section of the composer.json or run:
composer require neosidekick/htmlcontentWe use semantic-versioning so every breaking change will increase the major-version number.
Just set the NodeType to abstract and do your own thing:
'NEOSidekick.HtmlContent:Content.Html':
abstract: true'YOUR.PACKAGE:Content.Html':
superTypes:
'NEOSidekick.HtmlContent:Content.Html': trueprototype(YOUR.PACKAGE:Content.Html) < prototype(Neos.Neos:ContentComponent) {
renderer = afx`
<div class="container">
<NEOSidekick.HtmlContent:Content.Html isEditable={false}/>
</div>
`
}
Licensed under MIT, see LICENSE
We will gladly accept contributions. Please send us pull requests.
The package contains unit tests to verify the HTML parsing and validation logic. You can run the tests using PHPUnit.
If you are using ddev (recommended):
ddev exec bin/phpunit -c UnitTests.xml DistributionPackages/NEOSidekick.HtmlContent/Tests/UnitIf you are running it directly:
bin/phpunit -c UnitTests.xml DistributionPackages/NEOSidekick.HtmlContent/Tests/Unit