Where has Color Text Macro gone 4.0?!
Asked by simon roberts:

Confluence 3.5 has this macro <http://confluence.atlassian.com/display/CONF35/Color+Text+Macro>

Confluence 4.0 does not, so I cannot copy my existing wiki markup {color:blue}blue{color} and paste it in the template form. So how can you set colors when creating a template?

Thanks

Simon


Answers:
author: Ken Bour
body: Added this content above and tried to delete, but could not...

Ken


author: Ken Bour
body: The {hidden-data} macro is from CustomWare (<http://wiki.customware.net/repository/display/AtlassianPlugins/hidden-data>) and is part of its Scaffolding template. It "hides its contents when the page is being viewed, but allows it to be modified when editing."

I tried putting a {color:darkgreen} macro outside of {hidden-data} and it still does not work from a template.

If I insert a {color} macro as Wiki Markup on a standard page (other than a template), it works fine. I just noticed that inserting "darkgreen" seems to be problematic. It will work under Preview mode on a regular page; but, once the page is saved, the color returns to black. I tried {color:green} and that one remains permanent.

I then tried using "green" (vs. "darkgreen") using my above code and it still does not work. All text is rendered in black.

After further testing, it appears that the {color} macro does work correctly in a template, but what it won't do is change the color of a {text-data} entry -- another Scaffolding macro by CustomWare.

This may be a problem with {text-data} and not with Confluence. I will refer to CustomWare...

Ken

comments: author: Joe Clark
body: Yeah, it does sound like the text-data macro has some hard-coded styling in that case.


author: Ken Bour
body: Sorry to hijack this thread, but does the {color} macro work in a table under Confluence 4.1.x? For example, I have this Global Template macro coding which rendered perfectly in Confluence v3.5.9; however, the text comes out in plain black:

```
{hidden-data:whenEmpty=CEXTENSION}h3. {color:maroon}{*}EXTENSION{*}{color}|| Extension (Yes or Blank): | {color:darkgreen}{text-data:CEXTENSION|width=25px}{text-data}{color} ||| New Close Date: | {color:darkgreen}{text-data:CEXTDATE|width=200px}{text-data}{color} ||| New Close Time: | {color:darkgreen}{text-data:CEXTTIME|width=200px}{text-data}{color} |{hidden-data}
```

The color macro seems to work fine as Wiki Markup when inserted on a regular page.

Ken

comments: author: Joe Clark
body: What's the hidden-data macro? Could it be interfering with the colour scheme? Do you get the same behaviour if you remove this macro from the content?


author: Joe Clark
body: The new Confluence editor in 4.0 uses a color formatting menu in the editor toolbar.

If you want to copy and paste existing wiki markup into the new Confluence editor, use the Insert Wiki Markup dialog (see <http://confluence.atlassian.com/display/DOC/Confluence+Wiki+Markup>)

comments: author: simon roberts
body: Thanks Joseph

The problem is there's no {color} macro in 4.0. So when i try to create a template <http://confluence.atlassian.com/display/DOC/Adding+a+Template> using the markup {color} does not work. Atlassian needs to add this macro to 4.0!

Search the link you provided for color and you;ll seereference to {color} macro under text effects, but its not in v4.0

Please adise.

Thanks


author: Joe Clark
body: It works for me! am I not understanding your template scenario correctly?

![](http://content.screencast.com/users/jlclark/folders/Jing/media/14608704-5f2f-4d11-8d60-7b15b0bd8e93/2011-12-21_1405.png)

![](http://content.screencast.com/users/jlclark/folders/Jing/media/07bc6ace-4ee6-431e-a252-16fd637245e1/2011-12-21_1406.png)


author: simon roberts
body: mmm, i will re-look tomorrow when i have access to confluence. What version are you running, 4.1? is there an aditional plugin i have missed for this macro? thats the exact senario. cheers


author: Joe Clark
body: This is running vanilla Confluence 4.0.... maybe check your Plugin console and make sure there's no system plugins which have been inadvertently disabled?


author: simon roberts
body: I cant seem to attach screen shot.

i enter this:

{color:#ff0000}\<Update\>{color}

{color:#ff0000}Enter Name{color}

h3. Created By -

h3. Created By - {color:#ff0000}Enter Name{color}

_______________________________________

and get this  
\<Update\>

Enter Name

### {#CreatedBy-}Created By - {#toc-hId-1506317026}

### Enter Name"\>Created By - Enter Name {#toc-hId--1045839935}

_________________________________________

so the last entry is not rendering properly its adding **Enter Name"\>**, what am i doing wrong?

Thanks


author: Andrew Frayling
body: Hi Simon,

I don't think you're doing anything wrong. I just tried your code and got the same behaviour as you when previewing the template, but if I just saved the template anyway and then created a page from it the resulting page was fine.

Looks like a bug in the template preview code?

Andrew.


Tags: template