# Formatting available!

**URL:** <https://forum.choiceofgames.com/t/formatting-available/198>\
**Category:** Game Development\
**Created:** [August 12, 2011, 7:57pm UTC](https://forum.choiceofgames.com/t/formatting-available/198 "2011-08-12T19:57:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![masacannucapio](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@masacannucapio](https://forum.choiceofgames.com/u/masacannucapio)\
**Post date:** [August 12, 2011, 7:57pm UTC](https://forum.choiceofgames.com/t/formatting-available/198/1 "2011-08-12T19:57:50Z")

</div>

I’ve just implemented the capability for having text bold and/or italic (see image)

[http://imageshack.us/photo/my-images/641/screenshotlz.png/](http://imageshack.us/photo/my-images/641/screenshotlz.png/)

The mod is in currently in a fork on github, hoping to be noticed and pulled by maintainers. Meanwhile feel free to test it 🙂

---

<div class="post-metadata">

**Author:** ![RETowers](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/retowers/32/21477_2.png) [@RETowers](https://forum.choiceofgames.com/u/RETowers)\
**Post date:** [August 15, 2011, 8:30am UTC](https://forum.choiceofgames.com/t/formatting-available/198/2 "2011-08-15T08:30:55Z")

</div>

I’d probably try to test it, but, uh… you didn’t seem to actually leave any link to it (as far as I can see).

---

<div class="post-metadata">

**Author:** ![lordirishdas](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/lordirishdas/32/381_2.png) [@lordirishdas](https://forum.choiceofgames.com/u/lordirishdas)\
**Post date:** [August 16, 2011, 4:52pm UTC](https://forum.choiceofgames.com/t/formatting-available/198/3 "2011-08-16T16:52:34Z")

</div>

I was thinking the same thing lol, thought it was just me. 😛

---

<div class="post-metadata">

**Author:** ![statesman88](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@statesman88](https://forum.choiceofgames.com/u/statesman88)\
**Post date:** [August 29, 2011, 11:06am UTC](https://forum.choiceofgames.com/t/formatting-available/198/4 "2011-08-29T11:06:56Z")

</div>

I managed to track it down! I’ve really been wanting to be able to bold and italic, so I’m excited about this. 🙂 Here’s masacannucapio’s code (you may need a github account):

> **[masacannucapio/choicescript](https://github.com/masacannucapio/choicescript)**
>
> ChoiceScript is a language for developing multiple-choice games.

I believe you just need to download these files to replace your old versions:  
/web/scene.js  
/web/ui.js

And here are full instructions on how to use it:

> <https://github.com/dfabulich/choicescript/pull/95>
>
> ${var} prints the content of the variable
> $!{var} prints the first letter c…apitalized
> $b{var} wraps the variable in \<strong\> tag
> $i{var} wraps the variable in \<em\> tag
> 
> Order and case are not important, and different modifiers can be mixed.
> e.g.: $!b{var} will print the variable bolded and capitalized
> e.g.: $IB{var} will print the variable italicized and bolded
> 
> To use it for regular text it's enough to create a temp variable and put there the text to be formatted

I’m about to test it out. 🙂 It seems likely that it’ll be integrated into the main ChoiceScript download before long.

---

<div class="post-metadata">

**Author:** ![lordirishdas](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/lordirishdas/32/381_2.png) [@lordirishdas](https://forum.choiceofgames.com/u/lordirishdas)\
**Post date:** [August 30, 2011, 10:47am UTC](https://forum.choiceofgames.com/t/formatting-available/198/5 "2011-08-30T10:47:31Z")

</div>

Thank you, I am too far into this project to start using, but most definitely will in the next couple.

---

<div class="post-metadata">

**Author:** ![RETowers](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/retowers/32/21477_2.png) [@RETowers](https://forum.choiceofgames.com/u/RETowers)\
**Post date:** [August 30, 2011, 3:11pm UTC](https://forum.choiceofgames.com/t/formatting-available/198/6 "2011-08-30T15:11:01Z")

</div>

@statesman88 Thanks for tracking that down for us. I’ll take a look at it soon, although I don’t know how likely I am to use it. I’d like to know whether or not it will work on the other platforms CoG is on first.

---

<div class="post-metadata">

**Author:** ![statesman88](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@statesman88](https://forum.choiceofgames.com/u/statesman88)\
**Post date:** [September 4, 2011, 4:27pm UTC](https://forum.choiceofgames.com/t/formatting-available/198/7 "2011-09-04T16:27:54Z")

</div>

No problem! I believe it works by applying HTML tags to the text. Would that probably work on other systems?

It works great on my Windows laptop, using Firefox.
