IvanC
2019 年8 月 2 日 05:48
1
Hi, could someone help me out please with a line of HTML/CSS that I can embed into a topic box to (do something like) change a line of text to blue? I can then experiment with other changes…
I realise this is a super simple question for most here, but I’m struggling with the basics. Many thanks for any help.
Topics are prepared in Markdown . This standard does not implement coloured text like HTML.
You could try Discourse BBCode color or Awesome BBCodes Plugin: multi-paragraph, nestable, with auto-complete
(though I’ve not tried them myself)
5 个赞
IvanC
2019 年8 月 2 日 07:27
3
Thanks very much for the explanation and the suggestions.
1 个赞
RBoy
(RBoy)
2023 年11 月 3 日 15:15
4
如果您不想要一个插件(这需要编辑 app.yml 并重新构建 discourse,并且如果插件在未来停止工作,则有损坏的风险,尽管 BBCode 颜色插件是一个官方插件,风险较低),您可以添加一个主题附加组件,这可以通过管理员浏览器页面完成,无需重新编译:
“BBCode-lite” without the need to install a plugin …
Adds a simple control (palette icon) to the Composer to facilitate colouring of the foreground and background of text
[image]
Select a word or text
Hit the palette control
It will be wrapped like so: [wrap=color color=# bgcolor=#]word[/wrap]
Replace the #s with html-compatible colour names, e.g. “red”, “grey” … experiment.
NB Same caveats apply as to BBCode: can be used to hide text.
Credits
Uses @j.jaffeux ’s Generic bbco…