I'm using confluence from atlassian and I need a way to modify the text size, family, and color by using a user macro. I defined my macro as follows:
## @param 0:title=forecolor|type=string|desc=Text foreground color. Enter colors such as: red / blue / green / etc.
## @param 1:title=backcolor|type=string|desc=Text background color. Enter colors such as: red / blue / green / etc.
## @param 2:title=size|type=string|desc=Enter size in px, for example, 20px.
## @param 3:title=family|type=string|desc=Enter the font family (listing can be found here: http://www.w3.org/Style/Examples/007/fonts.en.html) (example: serif).
<span style="color: $param0; background-color: $param1; font-size: $param2; font-family: $param3;">$body</span>
Now the user can choose this macro 'Stylish' as such:
However confluence automatically adds a new line
tag with content I want to appear next to it. Assume I had the text:
The brown fox jumped over the cow.
And I wanted to set the background color of the word fox
as red and its forecolor to yellow. If I apply this macro to that word I end up with something like this:
So it automatically puts a new line in on the word that has the macro assigned to it. I want to keep it inline the entire sentence and apply the formatting to a single word. Even If I select inline
in the options it still puts it in a new line.
The result comes out to this:
Here is a screen shot in edit mode:
I have selected it inline, and published the page still the result shows the brown
on one line fox
on another line and finally jumped over the cow
on yet another line. Atlassian Confluence 5.4.4 This macro should work like the <span>
tag so that the item doesn't appear as a block style element.