我正在使用atlassian的汇合,我需要一种方法来使用用户宏来修改文本大小,族和颜色.我将我的宏定义如下:
## @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>
Run Code Online (Sandbox Code Playgroud)
现在用户可以选择这个宏'Stylish'如下:

但是,汇合会自动添加新行
带有内容的标记我想要显示在它旁边.假设我有文字:
棕色的狐狸跳过了牛.
我想将单词的背景颜色设置fox为红色,将前景颜色设置为黄色.如果我将这个宏应用于该单词,我最终会得到这样的结果:

因此,它会自动在分配了宏的单词上添加一行.我想让它内联整个句子并将格式应用于单个单词.即使我inline在选项中选择它仍然将它放在一个新的行.
结果出来了:

以下是编辑模式下的屏幕截图:

我已经选择内联,并且发布了页面,结果显示the brown在另一行的一行fox上,最后jumped over the cow是另一行. Atlassian Confluence 5.4.4 此宏应该像<span>标记一样工作,以便项目不会显示为块样式元素.