PHP code example of kraenzle-ritter / markdown-to-ead
1. Go to this page and download the library: Download kraenzle-ritter/markdown-to-ead 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-ead example snippets
use KraenzleRitter\MarkdownToEad\Convert;
$markdown = '# Überschrift
Paragraph _kursiv_ **fett**
- Item 1
- Item 2
Inline [Link](url).
';
$converter = new Convert();
$xml = $converter->toEad($markdown);
/**
<head>Überschrift</head><p>Paragraph <emph render="italic">kursiv</emph> <emph render="bold">fett</emph></p><list><item>Item 1</item><item>Item 2</item></list><p>Inline <extref xlink:href="url">Link</extref>.</p>
*/