1. Go to this page and download the library: Download php-collective/symfony-djot 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/ */
php-collective / symfony-djot example snippets
use PhpCollective\SymfonyDjot\Service\DjotConverterInterface;
class ArticleController
{
public function show(DjotConverterInterface $djot): Response
{
$html = $djot->toHtml($article->body);
$text = $djot->toText($article->body);
}
}