How to change text color in post on sitepoint

hi all

how to change text color for highlighting some words in the post on sitepoint ??

vineet

You can use [color=green]BBcode[/color].

You can use BBcode.

It seems to work in most situations, even though Discourse uses Markdown, rather than BBcode.

thanks technobear

is it possible for sitepoint to create a option of selecting changing text color beside the BOLD , ITALICS symbols so that users can select color from post editor bar which we see while creating post

vineet

As far as I know, that would need to be implemented by Discourse (the forum software) rather than SitePoint and they seem to have no interest in it.

https://meta.discourse.org/t/text-editor-feature-request/10046

(Things might have moved on since that discussion, but it was all I could find.)

It could also be done via a plugin, but the number of users who want it are the minority and are more than happy to use the bbcode tags directly.

The bbcode tags however, are a hack and are only in our instance via a plugin to provide backwards support for topics/posts we imported. I’d strongly recommend not depending on it, as there is no guarantee we’ll keep that plugin forever.

Markdown unfortunately has zero support for coloring text, you actually have to use HTML tags, which also work here.

This is Green

Produced by

<font color="green">This is Green</font>

Edit:
Seems the <font> tag isn’t a good thing to depend on either, it isn’t in the default whitelist of tags supported
https://github.com/discourse/discourse/blob/master/app/assets/javascripts/pretty-text/white-lister.js.es6#L101-L166

1 Like

It is my understanding that a main reason changes to the post editor are “back burner” is because there are plans to move from Markdown to CommonMark.
http://commonmark.org

The Discourse post editor is “a very integrated component” so it may take a while.
https://meta.discourse.org/t/how-to-embedded-discourse-meta-editor-into-my-blog/49387/2?u=mittineague

hope to see new features changes soon

vineet

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.