BBCode Formatter
This is an open discussion with 5 replies, filed under Extensions.
Search
Awesome work rowanjl!
I still prefer good old BBcode over Markdown, partly because I prefer [code] over indenting all my code some more (although I am getting the hang of it). I will surely use this extension, thanks Rowan!
Would it be hard to merge Markdown with some parts of BBcode?
Would it be hard to merge Markdown with some parts of BBcode?
Just try templated text formatter and create chain of markdown with bbcode :)
The best idea would be to chain them, but make the BBCode extension output valid Markdown. The reason for doing this is because the BBCode extension serializes any HTML, so if you put it last, the Markdown output will get destroyed.
I'll have a play around with this idea...
What if BBCode was first? AFAIK Markdown does not escape HTML, it just leaves it untouched.
I was also thinking about implementing simplest BBCode through regex formatter (included in templated formatters extension), but i'm not sure if it would work good/fast enough.
Create an account or sign in to comment.
I've finally finished my BBCode formatter extension, it contains two formatters, traditional and modern. Also, the parser will handle mismatched tags (
[a][b][/a][/b]
) without failing and can be easily extended if you want to add more elements (seelib/example_*.php
).Traditional
Provides the usual set of BBCode elements that people have been using since the dawn of UBB.
Modern
My attempt and making BBCode more useful by adding new elements similar to HTML:
h
/sh
: Header and sub header.bcode
/bquote
: Block code/quote element.code
/quote
: Inline code/quote element.a
,abbr
,acronym
,cite
,em
,img
,span
andstrong
Anyhow, please give it a try, and let me know if you find any issues.
EDIT: Forgot to mention a few things.
Attachments