CodeIgniter Forums
Bbcode support in helper - Printable Version

+- CodeIgniter Forums (
+-- Forum: CodeIgniter 4 (
+--- Forum: CodeIgniter 4 Feature Requests (
+--- Thread: Bbcode support in helper (/showthread.php?tid=76902)

Bbcode support in helper - mmrtonmoy - 07-01-2020

In codeigniter add a new helper call bbcode. It takes a string and return html tags.
You can do it with php build in function preg_replace()
like bbcode.
example :
line break return a <br> tag.
dobule line break return <p> tag with close tag also.
link tag Codeigniter return <a href=''>Codeigniter</a>
image tag [img][/img] return <img src="">

please add this helper feature soon.

RE: Bbcode support in helper - Chroma - 07-08-2020

What exactly are you requesting?

RE: Bbcode support in helper - kilishan - 07-08-2020

This is not something that will be in core. There are always third party libraries you can install directly, and PHP even has an extension you can compile in if you need it.

RE: Bbcode support in helper - hobbyci - 10-10-2020

I handle BBCodes via JS, not via PHP.

Take a look at

It is easy to setup, easy to extend and easy to use.

RE: Bbcode support in helper - includebeer - 10-10-2020

Try Parsedown:

It's not for BBCodes, it's for Markdown, but the syntax is even easier. The code is super easy to use:

PHP Code:
$Parsedown = new Parsedown();

$Parsedown->text('Hello _Parsedown_!'); # prints: <p>Hello <em>Parsedown</em>!</p>