Lozenges for Confluence

Version 8.1 by John on 2020/10/26 06:52

Introduction

A lozenge is nothing but content wrapped in a box with background color. Below are macros for two kinds of content: text only, rendered content.

At the moment, rendered content cannot include newlines.

Macro

Simple text lozenge:

## Macro title: loz
## Macro has a body: No
## @param text:title=Text|string=string
## @param color:title=Color|type=string|required=true|default=#0000ff
## @param textcolor:title=Text Color|type=string|required=true|default=#ffffff
<span style="background-color:$paramcolor; color:$paramtextcolor; border-radius:3px; padding:0px 3px 2px 3px">$paramtext</span>

Make sure to select "No macro body" in the "Macro Body Processing" section.

Lozenge with rendered body:

## Macro title: loz-body
## Macro has a body: Yes
## Body processing: Rendered
## @param color:title=Color|type=string|required=true|default=#0000ff
## @param textcolor:title=Text Color|type=string|required=true|default=#ffffff
<div style="display: inline-block; background-color:$paramcolor; color:$paramtextcolor; border-radius:3px; padding:0px 3px 2px 3px">$body</div>

Make sure to select "Rendered" in the "Macro Body Processing" section.

Using It

Here are some simple lozenges:




Some lozenges with inline, rendered body:


  • we can put

    Unknown macro: loz-body.

    too!

Unknown macro: loz-body.
Tags: confluence
Created by John on 2018/06/20 08:18