Page 1 of 1

BBCode: highlight background color of text

Posted: Thu Apr 07, 2016 7:58 pm
by arthaey
bbcode usage:

Code: Select all

[highlight={COLOR}]{TEXT}[/highlight]


HTML replacement:

Code: Select all

<span style="background-color: {COLOR};">{TEXT}</span>


Helpline:

Code: Select all

Highlight: [highlight=color]your text[/highlight]


Example:

Code: Select all

[highlight=yellow]this text is highlighted[/highlight]


[source]

Re: BBCode: highlight background color of text

Posted: Thu Apr 07, 2016 9:24 pm
by rdearman
arthaey wrote:bbcode usage:

Code: Select all

[highlight={COLOR}]{TEXT}[/highlight]


HTML replacement:

Code: Select all

<span style="background-color: {COLOR};">{TEXT}</span>


Helpline:

Code: Select all

Highlight: [highlight=color]your text[/highlight]


Example:

Code: Select all

[highlight=yellow]this text is highlighted[/highlight]


[source]


Installed, working.

Re: BBCode: highlight background color of text

Posted: Thu Apr 07, 2016 9:40 pm
by arthaey
Thank you! That was fast! :)

Re: BBCode: highlight background color of text

Posted: Fri Apr 08, 2016 7:43 am
by rdearman
arthaey wrote:Thank you! That was fast! :)

We aim to please.

Re: BBCode: highlight background color of text

Posted: Sat Aug 25, 2018 6:22 pm
by abusomaia
[highlight={green}]{thank u}[/highlight]

Re: BBCode: highlight background color of text

Posted: Fri Jul 02, 2021 1:44 pm
by rdearman
abusomaia wrote:[highlight={green}]{thank u}[/highlight]

I didn't see the original post. But to get this to work you have to use the html color code for green. "highlight=#008000"

Re: BBCode: highlight background color of text

Posted: Fri Jul 02, 2021 2:20 pm
by Gordafarin2
Wow, this is very cool indeed. Thanks to you both!

By the way abusomaia, it does accept colour names, not just hex codes, but you shouldn't use curly brackets. Like so:

Code: Select all

[highlight=yellow]very cool[/highlight]