Questions tagged [bbcode]

Bulletin Board Code is a lightweight markup language used to format posts in many message boards. There is no "standard" set of BBCodes, but they are typically parsed into other markup languages.

BBCode or Bulletin Board Code is a lightweight markup language used to format posts in many message boards. The available tags are usually indicated by square brackets ([ ]) surrounding a keyword, and they are parsed by the message board system before being translated into markup languages such as HTML.

Unlike SGML-based markup languages, tags in BBCode do not have attributes. Instead, they may have a single parameter attached to them with the equals sign as a separator, such as the "color" tag on phpBB boards, where [color=red] would make red text, for example.

Common tags include:

  • [b] which makes bold text*
  • [i] which makes italic text*
  • [u] which makes underlined text*
  • [s] which makes strikethrough
  • [quote] which makes a block-level quote box of another post*
  • [color] which takes a color parameter and makes colored text*
  • [code] which creates a code block, inside which BBCodes are typically not parsed*
  • [img] which embeds an image inline*
  • [url] which creates a link to a specified location*
  • [spoiler] which creates a button to show/hide contained text
  • [background] which highlights text

* available by default in phpBB 3.0

611 questions
36
votes
11 answers

Cleaning HTML by removing extra/redundant formatting tags

I have been using CKEditor wysiwyg editor for a website where users are allowed to use the HTML editor to add some comments. I ended up having some extremely redundant nested HTML code in my database that is slowing down the viewing/editing of these…
Aziz
  • 20,065
  • 8
  • 63
  • 69
31
votes
2 answers

Is there a way to use ungreedy matching in JavaScript for regular expressions?

I wonder if there is a way to use ungreedy matching in JavaScript? I tried the U modifer, but it doesn't seem to work. I want to write a small BBCode parser in JavaScript, but without ungreedy matching it isn't possible (at least as far as I see it)…
okoman
  • 5,529
  • 11
  • 41
  • 45
26
votes
7 answers

Can you suggest a Non-HTML WYSIWYG web editor?

I am scouting the market for a good WYSIWYG editor. My users are going to write stuff just like I'm doing now on Stack Overflow, but they aren't as tech-savvy as the SO users, so I need a WYSIWYG editor instead of this Markdown editor. Feature-wise,…
Thomas Lundström
  • 1,589
  • 1
  • 13
  • 18
16
votes
4 answers

Java BBCode library

Has anybody used a good Java implementation of BBCode? I am looking at javabbcode : nothing to see kefir-bb : Listed as alpha BBcode parser in JBoss source code. Are there any better options?
Rohit
  • 1,710
  • 5
  • 20
  • 29
12
votes
4 answers

What markup language for richly formatted content?

When you are developing a web-based application and you want to allow richly formatted text from the user you have to make a choice about how to allow that input. Many different markup languages have been created because it is arguably more…
Zoredache
  • 37,543
  • 7
  • 45
  • 61
12
votes
1 answer

Converting phpBB BBCode posts to Markdown

I have a phpBB2 forum with posts stored in BBCode. The forum posts are stored like this in the database: [quote:e5adceb8e8][quote:e5adceb8e8="Person 2"][quote:e5adceb8e8="Person 3"]Nested quote[/quote:e5adceb8e8]Another nested…
Chris Alley
  • 3,015
  • 2
  • 21
  • 31
11
votes
3 answers

Any good javascript BBCode parser?

Currently i'm parsing bbcode server side but i'd like to show a preview just like this site does. If I process the bbcode serverside using ajax it's a bit laggy, so i thought doing it client side, to just show the preview. Do you guys know any…
Drevak
  • 867
  • 3
  • 12
  • 26
10
votes
1 answer

Problem with tinymce and list-items

I am having a problem with using the bbcodeplugin and list-items. While the lists are being safed as bbcode as i want it, when reopening and editing the text, tinymce adds additional markup to lists, so that something like
  • one
schmitty
  • 101
  • 1
  • 4
9
votes
5 answers

Best way to parse bbcode

I'd like to work on a bbcode filter for a php website. (I'm using cakephp, it would be a bbcode helper) I have some requirement. Bbcodes can be nested. So something like that is valid. [block] [block] [/block] [block] …
Loïc Faure-Lacroix
  • 13,220
  • 6
  • 67
  • 99
9
votes
2 answers

How change the CKEditor text using jQuery?

I have a textarea with CKEditor (bbCode Plugin). This is my CKEditor instance: $( document ).ready( function() { $( 'textarea#editor1' ).ckeditor(); }…
user2297392
9
votes
8 answers

Linebreaks in TinyMCE editor show extra line on preview, not in code

I'm using the BBCode plugin with TinyMCE and see that line breaks are not showing the same between the preview and the HTML code. I have the following lines in the editor window: This is line one This is line three Line two is empty. When I'm…
Kordonme
  • 2,314
  • 3
  • 20
  • 32
8
votes
4 answers

Why should I use BBCode but not HTML in comment forms?

I'm writing a comment parsing function in PHP. Since BBCode is not a real markup language, I'v never liked the writing style. So I'm giving visitors the ability to use basic HTML code in comment forms. And when posting, PHP will check for disallowed…
Jon
  • 81
  • 1
  • 3
8
votes
4 answers

Parse BB code for PHPBB3

Looking to parse BB code in PHP using PHPBB3's functions. I've got this far:
Tom Gullen
  • 61,249
  • 84
  • 283
  • 456
7
votes
3 answers

Does a lightweight markup language library for Android exist?

Suppose I want to render/present a text transmitted in the form of some lightweight markup language. Are there any ready-to-use libraries for Android, which take as input text in a lightweight markup language and present it nicely? When I say…
Karen Tamrazyan
  • 157
  • 2
  • 12
7
votes
2 answers

How to convert HTML to BBCode

I maintain a bulletin board that saves rich text messages in HTML. Now I need to migrate all those messages into Joomla Kunena bulletin board that requires BBCode representation of HTML. Is there any library to convert HTML to BBCode cleanly. There…
mevdiven
  • 1,902
  • 2
  • 17
  • 33
1
2 3
40 41