Word Wrap
Replies 2
Hi Greg and Gavin,
The toHTML method in both BBCode classes has a $nr2br parameter that converts newlines to
tags:
This is used in the Parser::content() method:
The toHTML method in both BBCode classes has a $nr2br parameter that converts newlines to
tags:
if ($nr2br) $str = preg_replace_callback("/\n\r?/", function ($match) { return "<br/>"; }, $str);This is used in the Parser::content() method:
$text = $BBcode->toHTML($text, false, true); // true enables nl2br
- Before ask a question, read the documentation.
- 🎉 Featured as #1 product of the day on Product Hunt
- Please like in alternativeto.net 👍🏻
- ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
- <TextField>, my new CMS project designed by a passionate developer, for developers!
- My last project Fast⚡︎CMS, a Flat-File cms.
- I am currently busy 😫.
Suggested Topics

Simon
started solved 🇫🇷 Choix des langues
Bug reports

Gavin
started plugin Plugin Uninstaller
Resources

Simon
started 🇫🇷 Mon avis sur flatboard
International Discussions

jcjm@f330cc9c
started todolist Private forum is shown to everyone
Bug reports