PHP code example of bitandblack / markdown-idml-converter
1. Go to this page and download the library: Download bitandblack/markdown-idml-converter 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/ */
bitandblack / markdown-idml-converter example snippets
use BitAndBlack\IdmlCreator\Content\Style\CharacterStyle;
use BitAndBlack\IdmlCreator\Content\Style\ParagraphStyle;
use BitAndBlack\MarkdownIdmlConverter\MarkdownToStyles;
$formats = [
MarkdownToStyles::PARAGRAPH_STYLE_BODY => new ParagraphStyle('Body'),
MarkdownToStyles::CHARACTER_STYLE_ITALIC => new CharacterStyle('Italic'),
MarkdownToStyles::CHARACTER_STYLE_BOLD => new CharacterStyle('Bold'),
];
use BitAndBlack\MarkdownIdmlConverter\MarkdownToStyles;
$markdownToStyles = new MarkdownToStyles($formats);
$paragraphStyleRange = $markdownToStyles->convert($markdownFormattedText);