PHP code example of csrdelft / bb
1. Go to this page and download the library: Download csrdelft/bb 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/ */
csrdelft / bb example snippets
$parser = new \CsrDelft\bb\DefaultParser();
echo $parser->getHtml('[h=1]Hello World[/h]');
class BbSuperscript extends BbTag {
public static function getTagName() {
return 'sup';
}
public function render() {
return '<sup class="bb-tag-sup">' . $this->getContent() . '</sup>';
}
public function parse($arguments = []) {
$this->readContent(['sub', 'sup']);
}
}