# Text Formatting?

**URL:** <https://forum.choiceofgames.com/t/text-formatting/7063>\
**Category:** Game Development\
**Created:** [January 26, 2015, 2:14am UTC](https://forum.choiceofgames.com/t/text-formatting/7063 "2015-01-26T02:14:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![benhamill](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/benhamill/32/198894_2.png) [@benhamill](https://forum.choiceofgames.com/u/benhamill)\
**Post date:** [January 26, 2015, 2:14am UTC](https://forum.choiceofgames.com/t/text-formatting/7063/1 "2015-01-26T02:14:59Z")

</div>

I didn’t see it, if it’s part of the [official docs](https://www.choiceofgames.com/make-your-own-games/choicescript-intro/), but maybe I just missed it. If so, sorry and someone please link me?

How much control over formatting do we have, in ChoiceScript? I see there’s `[i]` and `[b]` (which, I’ve discovered, end at the end of the line in the source code, which seems odd to me). I was wondering about, say, changing the color of a section of text, etc. Is there an easy way to do this? Or would I be adding a class to the css and then… doing something to get a paragraph or `<div>` labeled with that class?

Thanks, in advance, for the help.

---

<div class="post-metadata">

**Author:** ![FairyGodfeather](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fairygodfeather/32/16709_2.png) [@FairyGodfeather](https://forum.choiceofgames.com/u/FairyGodfeather)\
**Post date:** [January 26, 2015, 2:22am UTC](https://forum.choiceofgames.com/t/text-formatting/7063/2 "2015-01-26T02:22:40Z")

</div>

There’s no easy way to do it.

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [January 26, 2015, 2:48am UTC](https://forum.choiceofgames.com/t/text-formatting/7063/3 "2015-01-26T02:48:29Z")

</div>

There’s also string line breaks with [n/].  
You can edit the source and simply add additional regex rules to match your custom tags, but otherwise as FGF says, there’s no standard support for any more.

---

<div class="post-metadata">

**Author:** ![benhamill](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/benhamill/32/198894_2.png) [@benhamill](https://forum.choiceofgames.com/u/benhamill)\
**Post date:** [January 26, 2015, 5:02am UTC](https://forum.choiceofgames.com/t/text-formatting/7063/4 "2015-01-26T05:02:16Z")

</div>

Hmm hmm. OK. Thanks, y’all. I may go poke around in the source code. Does CoG accept Pull Requests on the repository?

---

<div class="post-metadata">

**Author:** ![benhamill](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/benhamill/32/198894_2.png) [@benhamill](https://forum.choiceofgames.com/u/benhamill)\
**Post date:** [January 26, 2015, 5:32am UTC](https://forum.choiceofgames.com/t/text-formatting/7063/5 "2015-01-26T05:32:47Z")

</div>

I opened two Issues on the Github repository. We’ll see what comes of them. 😄

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [January 26, 2015, 9:14am UTC](https://forum.choiceofgames.com/t/text-formatting/7063/6 "2015-01-26T09:14:31Z")

</div>

No, they don’t, not from my experience.  
I can’t even recall Dan commenting on a recent pull request. You’d probably have more luck sending an email.

EDIT: I knew I’d answered this before somewhere!

> [@How to change Font Color?](https://forum.choiceofgames.com/t/how-to-change-font-color/1465/5):
>
> @nine Only by changing the cs interpreter code. Look in the ui.js file and at the top there is a function called printx within it there is a series of .replace lines, like: .replace(/\\[i\\]/g, '\<i\>') .replace(/\\[\\/i\\]/g, '\</i\>') You want to add two more, similar to this: .replace(/\\[blue\\]/g, '\<span style="color:blue;"\>') .replace(/\\[\\/blue\\]/g, '\</span\>'); Note that the semicolon is only necessary on your last line. Whether or not this sort of modification will work with publis…
