codeq/htmlcontent

HTML content nodes for the Neos CMS

v2.0.0 2024-06-19 14:19 UTC

This package is auto-updated.

Last update: 2024-10-19 14:57:13 UTC


README

Latest Stable Version License

HTML Content nodes for Neos CMS

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.

Features

  • 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.

HTML Content Demo

The development and the public-releases of this package are generously sponsored by Code Q Web Factory.

Installation

NEOSidekick.HtmlContent is available via packagist. "neosidekick/htmlcontent" : "~2.0" to the require section of the composer.json or run:

composer require neosidekick/htmlcontent

We use semantic-versioning so every breaking change will increase the major-version number.

You want to define your own NodeType or different Fusion?

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': true
prototype(YOUR.PACKAGE:Content.Html) < prototype(Neos.Neos:ContentComponent) {
  renderer = afx`
    <div class="container">
      <NEOSidekick.HtmlContent:Content.Html isEditable={false}/>
    </div>
  `
}

License

Licensed under MIT, see LICENSE

Contribution

We will gladly accept contributions. Please send us pull requests.