MyBB Community Forums

Full Version: [pre] formatting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there anyway to add [pre] formatting? I've seen some at BBcodes explained, but the code doesn't work, and that's not exactly what I want anyways.

I want it to act as <pre> in HTML. Anyway to get this without activating HTML for all users?
Yes, you can create a simple MyCode.

Admin CP -> Configuration -> MyCode -> Add New MyCode

For Regular Expression, use:
\[pre\](.*?)\[/pre\]

And for Replacement, use:
<pre>$1</pre>
hmmm... i used this and it worked great in backend... but in front end it adds a blank extra line between each line of code... Any ideas?