markup-carve / shopware-carve
Render Carve markup to safe HTML in Shopware: Twig filters, CMS element, product/category fields, live preview, mail, inline product references.
Package info
github.com/markup-carve/shopware-carve
Type:shopware-platform-plugin
pkg:composer/markup-carve/shopware-carve
Requires
- php: ^8.2
- markup-carve/carve-php: ^0.1.9
- shopware/core: ~6.6.0 || ~6.7.0
Requires (Dev)
- php-collective/code-sniffer: ^0.6.0
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^11.5 || ^12.0 || ^13.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-03 00:29:01 UTC
README
Render Carve markup in Shopware 6. The plugin supports Twig filters, CMS elements, product and category fields, admin preview, transactional mail, product references, reviews, and CLI conversion.
Install markup-carve/shopware-carve for Shopware 6.6 or 6.7 on PHP 8.2 or
newer. The package uses the MarkupCarve\Shopware\ namespace and the MIT
license.
This package is pre-1.0. Syntax and output may change before 1.0. Pin versions and review the carve-php changelog before upgrading.
Install
composer require markup-carve/shopware-carve bin/console plugin:refresh bin/console plugin:install --activate ShopwareCarve bin/console database:migrate --all ShopwareCarve bin/console bundle:dump bin/build-administration.sh bin/console assets:install bin/console theme:compile bin/console cache:clear
See the installation reference for prerequisites, development installs, and asset-package details.
Twig filters
{{ product.translated.description | carve }}
{{ product.translated.description | carve_text }}
{{ product.translated.description | carve_md }}
Use carve for HTML, carve_text for plain text, and carve_md for Markdown.
Content containing :product[SKU] references needs the sales-channel-aware
filter:
{{ product.translated.description | carve_ctx(context) }}
Shopware surfaces
The plugin supplies:
- a Carve CMS element with live administration preview;
carve_body,carve_category_body, andcarve_manufacturer_bodyfields;- HTML and plain-text transactional mail rendering;
:product[SKU]inline references resolved in the sales-channel context;- a restricted comment profile for product reviews;
carve:renderfor HTML, text, Markdown, and terminal output.
The surface reference documents each integration point and includes template examples. The gallery shows the CMS, storefront, mail, review, and CLI output with its source.
Configuration
Configure the plugin under Extensions > My extensions > Carve for Shopware. The main settings control raw HTML, live preview, symbol shortcodes, smart quotes, Mermaid, Chart.js, PlantUML, content profiles, and contained file includes.
Raw HTML is disabled by default. Diagram options may load code or images from configured external services, so their CSP and trust requirements differ from the core renderer.
The configuration reference lists every setting, default, CSP requirement, and custom-profile extension point.
Security
The renderer always neutralizes dangerous URL schemes and strips event-handler,
srcdoc, and formaction attributes. Raw HTML remains off unless an
administrator enables it. Review content uses the stricter comment profile.
See Security for the threat model, examples, and the limits of each content profile.
Enabled Carve extensions
Admonitions, details, list tables, inline footnotes, autolinks, external-link hardening, tables of contents, spoilers, code groups, and tabs are registered without extra JavaScript. Smart quotes and diagram renderers are enabled by configuration.
The extension table lists their exact syntax and output behavior.
See Authoring and commerce elements for the shared editor, field mapping, commerce syntax, placement, and headless components. Shared content with includes covers translated file libraries, publication permissions, and deployment invalidation.
Development
The complete reference retains the API, configuration,
surface, version-support, and maintenance details. Run composer check plus
the checks in the storefront JavaScript workflow
before submitting changes.