Skip to content

Commit e38bdcb

Browse files
committed
still a readme update
1 parent ec83541 commit e38bdcb

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,30 @@ Here's the list of supported BBcodes:
8888
| [size=20] _test_ [/size] | sets font size (in pixels) |
8989
| [color=#ff0000] _test_ [/color] | sets text color (hex vlue) |
9090
| [url] _http://mypage.com_ [/url] | creates a link |
91+
| [img] _http://mypage.com/myimage.jpg_ [/img] | creates an image |
9192
| [ul]<br/>[\*] test 1 <br/>[\*] test 2 <br/>[/ul] | unordered list |
9293
| [ol]<br/>[\*] test 1 <br/>[\*] test 2 <br/>[/ol] | ordered list |
9394

9495
<br/><br/>
96+
97+
98+
### Summarizing
99+
100+
``` php
101+
include_once('lc_quick_shortcodes.php');
102+
$lcqs = new lcweb\quick_sc\lc_quick_shortcodes;
103+
104+
$lcqs->register('title', array('lang'=>'html'), true, function($atts, $contents) {
105+
return '<pre class="language-'. $atts['lang'] .'"><code>'. $contents .'</code></pre>';
106+
});
107+
108+
109+
$string = 'Lorem ipsum [code lang="php"]dolor sit amet[/code]';
110+
echo $lcqs->process($string, $bbcodes = true);
111+
```
112+
113+
<br/><br/>
114+
95115
* * *
96116

97117
Copyright &copy; Luca Montanari (aka LCweb)

0 commit comments

Comments
 (0)