# About the limitation of BBcode in KX postiing

#1

I’ve recently interested in a BBcode for writing a post in KX site. Sometimes I want to highlight some text, resize the font size, or change the text color according to BBcode as below:

[style color=“red”]Red Text[/style]
[style size=“15px”]Large Text[/style]
[highlight=yellow]this text is highlighted[/highlight]

But it’s not working as I wished. I’m guessing there must exist some alternative ways to express those codes.
Could you let me know the limitation of the use of BBcode in creating a KX post?

#2

Hi,
Lumerical forum supports subset of Markdown, BBCode and HTML formatting, but it is certainly limited. To provide a complete answer, I will quote from the Discourse forum:

There’s three things to consider.

What Markdown is allowed?
What BBCode is allowed?
What HTML is allowed?
All 3 can be mixed and merged to some extent.

Markdown

Simple: the Markdown implementation is very close to the standard.

BBCode

We support a subset of “common” BBCode.

As for what BBCode is supported, the best place to look is the tests (tests\javascripts\lib\bbcode-test.js.es6), and here’s what I see there:

> [b]strong[/b]
> [i]emphasis[/i]
> [u]underlined[/u]
> [s]strikethrough[/s]
> [ul][li]option one[/li][/ul]

> [quote="eviltrout"][/quote]

> [img]http://eviltrout.com/eviltrout.png[/img]
> [url]http://bettercallsaul.com[/url]
> [email]eviltrout@mailinator.com[/email]
> [code]\nx++\n[/code]
> Custom BBCode specific to Discourse, needed for functions that don't fit into Markdown, but do fit into BBCode.

> [spoiler]it's a sled[/spoiler]
> [quote="eviltrout, post:1, topic:2"]


HTML

Markdown specifies that it works seamlessly with HTML, so we do.

However, we only support a “safe” subset of HTML. I’ll have to dig to find the specifics, but anything common you’d expect to work that isn’t crazy – like:
<script> -- should work.

#3

Hi @mbenes,

I appreciate your detailed information on BBcode and HTML .
It is quite helpful for me to post an article in KX forum.