PHP code example of kraenzle-ritter / markdown-to-tei
1. Go to this page and download the library: Download kraenzle-ritter/markdown-to-tei 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/ */
kraenzle-ritter / markdown-to-tei example snippets
MarkdownToTei\Converter;
use MarkdownToTei\Config\ConversionConfig;
$config = new ConversionConfig();
$converter = new Converter($config);
$markdown = "# Title\n\nThis is a [supplied text] with **important** text.";
$teiXml = $converter->convert($markdown);
echo $teiXml;
$tei = $converter->convert($markdown);
foreach ($converter->getWarnings() as $warning) {
$logger->notice($warning); // e.g. no mapping for element "h4", emitted as <div type="h4">
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.