PHP code example of markup-carve / shopware-carve
1. Go to this page and download the library: Download markup-carve/shopware-carve library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
markup-carve / shopware-carve example snippets
var_dump(class_exists('MarkupCarve\\Carve\\CarveConverter')); // bool(true)
use MarkupCarve\Carve\CarveConverter;
use MarkupCarve\Carve\Profile;
// Example: comment profile but also deny links
$profile = Profile::comment()
->denyInline(['link'])
->setMaxNesting(3)
->onDisallowed(Profile::ACTION_STRIP); // strip instead of converting to text
$converter = new CarveConverter();
$converter->setProfile($profile);
$html = $converter->convert($source);