插入用户宏时自动换行

7
我是使用Atlassian的Confluence,需要通过用户宏的方式修改文本的大小、字体和颜色。我已经定义了以下的用户宏:
## @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>

现在用户可以选择这个宏“Stylish”,如下所示:

enter image description here


然而,Confluence会自动添加一个带有内容的新行

标签,我希望它出现在旁边。假设我有以下文本:

The brown fox jumped over the cow.

我想将单词fox的背景颜色设置为红色,前景颜色设置为黄色。如果我将此宏应用于该单词,我最终会得到如下结果:

enter image description here

因此,它会自动在具有分配宏的单词上插入新行。我想保持整个句子内联,并将格式应用于单个单词。即使我在选项中选择inline,它仍会放在新行中。

结果如下:

enter image description here

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

enter image description here

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


我看不到你的例子。 - MNRSullivan
你选择了哪个单选按钮来处理宏体? - MNRSullivan
当我在选项中选择了“inline”时,我设法让它工作了。不过,在宏后面光标前面按退格键才行。在编辑器中多试试,直到它能正常工作,我向你保证这是可能的。 - MNRSullivan
这不起作用,我已经点击了内联,并在单词前按下了退格键。 - JonH
2
我曾试图悬赏此问题,但也没有得到答案而过期了。我还在Atlassian的问答论坛上发布了这个问题,但没有任何回应。我已经创建了一个Atlassian的支持工单,并将提供任何更新,如果他们能够解决这个问题。 - JonH
显示剩余8条评论
1个回答

0

这个问题没有好的解决方法。你可以跟踪一个 JIRA 问题:CONF-15860


请将此内容添加为注释而非答案,我还开了一个 Jira 问题以进行跟进(请参见评论部分)。 - JonH

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接