PHP code example of wptelegram / format-text
1. Go to this page and download the library: Download wptelegram/format-text 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/ */
wptelegram / format-text example snippets
// Or this for usage in WordPress
s = [
'format_to' => 'Markdown',
];
$converter = new \WPTelegram\FormatText\HtmlConverter( $options );
// The text is now safe to be sent to Telegram
$text = $converter->convert( $html );