markup icon indicating copy to clipboard operation
markup copied to clipboard

No longer possible to color text in Markdown

Open peterflynn opened this issue 12 years ago • 90 comments

Earlier, GFM allowed you to create colored text this way: <font color="red">Status: **Not yet implemented**</font>

That used to work. But at some point the <font> tag was removed from the HTML sanitization whitelist.

I suppose it got removed because it's deprecated in HTML5. (Aside: the color attribute is still on the whitelist. Should it be removed too? As far as I know, there's no other HTML tag it can be used on...)

So, can we have a new supported way of coloring text in sanitized GFM now?

Here's one possibility: allow a very strict use of style for setting colors. Only attributes that exactly match the form style="color: #xxxxxx" would be permitted. For something as constrained as that, you could enforce it with a simple regexp like ^color:\s*#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$.

peterflynn avatar Sep 17 '14 22:09 peterflynn

+1

matheusft avatar Jun 20 '19 12:06 matheusft

Please re-open this and provide an update. It's a handy functionality and many people have expressed interest!

AzySir avatar Jul 24 '19 02:07 AzySir

I'll pile on to say that I have significant need for this capability for my work.

a2sheppy avatar Aug 09 '19 17:08 a2sheppy

+1

dyasny avatar Aug 20 '19 16:08 dyasny

@dyasny good luck - Sounds like no one wants to touch this. Maybe Microsoft employed someone who would be willing to take on the challenge ;)

AzySir avatar Aug 21 '19 06:08 AzySir

This is ridiculous - how hard can it be to add the ability to allow <span style="color: red;">text</span> into the markdown - what is the point of allowing issues to be raised if no one actually gives two hoots about them, when there is obviously a lot of people who would benefit from this feature?

ghost avatar Sep 06 '19 13:09 ghost

+1

davidalexandercurrie avatar Sep 15 '19 01:09 davidalexandercurrie

+1

algirdask avatar Sep 25 '19 05:09 algirdask

Please do not add +1 to this or any issue. It notifies everyone and provides no value.

If you want to show your support for an issue, add a reaction to the original comment.

If you want to be notified about changes/updates, there's a subscribe button near the top on the right.

fearphage avatar Sep 25 '19 17:09 fearphage

I'll +1 this to be annoying like the lazy Github developers that have kicked this can down the road for 5+ years... Why can't you guys add some basic support for coloring text?!? It's way past ridiculous already.

jeffreydwalter avatar Oct 04 '19 15:10 jeffreydwalter

Can GitLab actually give a reason why this request is being ignored? Is it because it is too technically challenging to implement or because they don’t think this feature has merit? I would of thought it would be relatively easy to allow users to use foreground and background colours in Markdown - the syntax already exists in HTML, which could be implemented by allowing the SPAN tag in Markdown. Happy to stop pushing for this if there is actually a technical reason why this isn’t possible.

ghost avatar Oct 04 '19 22:10 ghost

@bkeepers, which gem are you using for this. Can you provide a link to the repository so one of us can propose an upstream PR?

Thank you.

loren-osborn avatar Oct 24 '19 19:10 loren-osborn

I've come across this thread since i needed to highlight some parts of a README file in green and red. I have resorted to using the diff language tag to generate some colored text and it luckily fits my use case, but i want to express my interest in re-opening this unfortunately closed issue and hope we can get an update on the current situation as to why this is not possible after 5 years since this feature has been requested.

hogmansan avatar Nov 12 '19 15:11 hogmansan

And another one! Please make it possible to highlight text in different colors. I would need for my documentation. So, if you need some info why this would be good.

One of my projects puts out strings like this "4$VYb030llJwQLSmOT+OwsjA$1R447MnqP71JV12qXASEd++gR3cW9AfRUHVmWThiRwU+JzGHD99p53wbIV+kKoiy$cVBESqRgkflwX2jzBkThyfAzHWJm3L1tg5LCq849Pzw". This string is made of 4 different parts. Being able to color each of these parts would help the reader very much.

xformerfhs avatar Nov 21 '19 12:11 xformerfhs

I don't understand, is this too complex too implement or cost too much money?

I WILL THROW MONEY AT YOU TO MAKE THIS HAPPEN!

JackOfSpade avatar Jan 22 '20 04:01 JackOfSpade

:disappointed: 6 years down the line. Still no support. Github supports all the stupid emojis but not colored text. :weary:

fenilgandhi avatar Mar 11 '20 22:03 fenilgandhi

I do not believe we have waited this long with no definitive yes or no!

perlygatekeeper avatar Apr 02 '20 00:04 perlygatekeeper

We need colors, coding is no more a monocrome text on a terminal, Microsoft, give us life !

GiuseppeChillemi avatar Apr 04 '20 23:04 GiuseppeChillemi

my god it takes

solrachix avatar Apr 08 '20 11:04 solrachix

Colors please!

jeppeutzon avatar Apr 16 '20 08:04 jeppeutzon